Commit 8f5394be authored by Your Name's avatar Your Name
Browse files


parent 3200adbb
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import sys
import matplotlib.pyplot as plt
from scipy.linalg import inv
from sklearn.datasets import make_regression, make_classification
......@@ -9,6 +10,10 @@ import json
from import json_normalize
import os
import datetime as dt
sys.path.insert(1, '..\src')
import preprocessing
kwargs = dict(random_state=42)
def linearRegression(df_singlePeriod):
......@@ -39,7 +44,7 @@ def linearRegression(df_singlePeriod):
def predictValues(test, temp_list, temp):
def predictValues_generel(test, temp_list, temp):
counter = 1
pred_list = list()
# pred_list.append(temp_list[0])
......@@ -63,6 +68,37 @@ def predictValues(test, temp_list, temp):
temp['linearReg'] = pred_list
print("Values have been predicted!")
def predictValues_clust0(input):
counter = 1
pred_list = list()
temp_list = input['inter_pol'].tolist()
emptie_checkpoints = preprocessing.calculate_empties(input, 1.01)
for k in range(emptie_checkpoints[0]):
y = -3.62261628 * k + temp_list[0]
for timeinterval in emptie_checkpoints:
if counter < len(emptie_checkpoints):
length = emptie_checkpoints[counter] - timeinterval
counter = counter + 1
for i in range(length):
y = -3.62261628 * i + temp_list[timeinterval]
addition = input.shape[0] - emptie_checkpoints[-1]
for j in range(addition):
y = -3.62261628 * temp_list[emptie_checkpoints[-1]]
print('values have been predicated')
rmse = mean_squared_error(temp_list, pred_list, squared=False)
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