Kaynağa Gözat

fixed a bug in cross-validation with fine tuning

tanja 3 yıl önce
ebeveyn
işleme
950d8c5f23

+ 0 - 43
cdplib/ml_validation/cross_validate_with_fine_tuning.py

@@ -60,24 +60,6 @@ from sklearn.model_selection import StratifiedKFold
 from cdplib.log import Log
 
 
-
-
-
-aa = make_sliding_window_cv(data_set_size=50,
-                            test_proportion=0.1,
-                            train_proportion=0.6,
-                            step_proportion=0.1)
-
-aa = list(aa)
-
-aa = make_sliding_window_cv(test_proportion=0.1,
-                            train_proportion=0.6,
-                            step_proportion=0.05,
-                            index=pd.date_range(start=pd.to_datetime("2020-01-01"), periods=50))
-
-aa = list(aa)
-
-
 # TODO: write with yield !!!!
 
 def make_nested_expanding_cv(
@@ -126,31 +108,6 @@ def make_nested_expanding_cv(
                                     "Exit with error: {}".format(e)))
 
 
-
-
-for train_inds, test_inds in aa:
-    print(len(test_inds)/(len(train_inds) + len(test_inds)))
-    print(len(test_inds)/50)
-
-aaa = list(aaa)
-
-for aaa_cv in aaa:
-    for train_inds, test_inds in aaa_cv:
-        print(len(test_inds)/(len(train_inds) + len(test_inds)))
-        print(len(test_inds)/50)
-
-aaa = make_nested_expanding_cv(#data_set_size=50,
-                               test_proportion=0.1,
-                               start_train_proportion=0.6,
-                               step_proportion=0.1,
-                               index=pd.date_range(start=pd.to_datetime("2020-01-01"), periods=50))
-
-aaa = list(aaa)
-
-
-
-
-
 def cv_slice_dataset(X, y, train_inds, test_inds)\
         -> Tuple[Union[pd.DataFrame, np.ndarray],
                  Union[pd.Series, np.ndarray]]: