Open
Description
In the second definition of linear_regressin
of this block, it reads
def linear_regression(features, labels, learning_rate=0.01, epochs = 1000):
price_per_room = random.random()
base_price = random.random()
errors = []
for i in range(epochs):
predictions = features[0]*price_per_room+base_price
errors.append(rmse(labels, predictions))
i = random.randint(0, len(features)-1)
I suppose the predictions should be calculated on all features instead of just the fixed first feature.
predictions = features[0]*price_per_room+base_price
This makes predictions a scalar instead of a vector. Then, the following rmse
makes no sense.
Should it be like this?
predictions = features*price_per_room+base_price
Metadata
Metadata
Assignees
Labels
No labels