Skip to content

Commit 0f7f55a

Browse files
committed
! count of graphics, polinoms
1 parent 8188b0f commit 0f7f55a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

configs/linear_regression_cfg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
cfg = EasyDict()
66
cfg.dataframe_path = os.path.basename("linear_regression_dataset.csv")
77
# TODO list of basis functions
8-
cfg.base_functions = [lambda x, degree=i: x**degree for i in range(8)]
8+
cfg.base_functions = []

execute.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,9 @@ def experiment(lin_reg_cfg, visualise_prediction=True):
2323
if __name__ == "__main__":
2424
from configs.linear_regression_cfg import cfg as lin_reg_cfg
2525

26-
experiment(lin_reg_cfg, visualise_prediction=True)
26+
degrees = [1, 8, 100]
27+
for elem in degrees:
28+
lin_reg_cfg.update(
29+
base_functions=[lambda x, degree=i: x**degree for i in range(1 + elem)]
30+
)
31+
experiment(lin_reg_cfg, visualise_prediction=True)

0 commit comments

Comments
 (0)