Commit 5d22d90e authored by Lukas-Stingl's avatar Lukas-Stingl
Browse files

added rmse in linearRegression.py

parent e411ed34
This diff is collapsed.
......@@ -44,7 +44,7 @@ def linearRegression(df_singlePeriod):
print(y_pred)
print(lr.coef_)
def predictValues_generel(test, temp_list, temp):
def predictValues_general(test, temp_list, temp):
counter = 1
pred_list = list()
# pred_list.append(temp_list[0])
......@@ -66,6 +66,8 @@ def predictValues_generel(test, temp_list, temp):
y = -3.62261628 * j + temp_list[test[-1]]
pred_list.append(y)
temp['linearReg'] = pred_list
rmse = mean_squared_error(temp_list, pred_list, squared=False)
print("Root Squared Mean Error: " + str(rmse))
print("Values have been predicted!")
def predictValues_clust0(input):
......@@ -96,7 +98,7 @@ def predictValues_clust0(input):
print('values have been predicated')
rmse = mean_squared_error(temp_list, pred_list, squared=False)
print(rmse)
print("Root Squared Mean Error: " + rmse)
return pred_list
def linearRegressionPlot(temp, test, cluster):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment