File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ def experiment(lin_reg_cfg, visualise_prediction=True):
9
9
linreg_dataset = LinRegDataset ()(lin_reg_cfg .dataframe_path )
10
10
11
11
predictions = lin_reg_model (linreg_dataset ["inputs" ])
12
- error = round ( MSE (predictions , linreg_dataset ["targets" ]), 2 )
12
+ error = MSE (predictions , linreg_dataset ["targets" ])
13
13
14
14
if visualise_prediction :
15
15
Visualisation .visualise_predicted_trace (
16
16
predictions ,
17
17
linreg_dataset ["inputs" ],
18
18
linreg_dataset ["targets" ],
19
- plot_title = f"Полином степени { len (lin_reg_cfg .base_functions )} ; MSE = { error } " ,
19
+ plot_title = f"Полином степени { len (lin_reg_cfg .base_functions )} ; MSE = { round ( error , 2 ) } " ,
20
20
)
21
21
22
22
@@ -26,6 +26,7 @@ def experiment(lin_reg_cfg, visualise_prediction=True):
26
26
degrees = [1 , 8 , 100 ]
27
27
for elem in degrees :
28
28
lin_reg_cfg .update (
29
- base_functions = [lambda x , degree = i : x ** degree for i in range (1 + elem )]
29
+ # we have f1, f2, ... fn functions, about f0 in __plan_matrix
30
+ base_functions = [lambda x , degree = i : x ** degree for i in range (1 , 1 + elem )]
30
31
)
31
32
experiment (lin_reg_cfg , visualise_prediction = True )
You can’t perform that action at this time.
0 commit comments