예제 #1
0
def stacker_data_v2(cutoff, num_least_correlated_cols):
    X, y_train = load_data()
    oof_predictions, lb_predictions, oof_ginis = load_predictions_with_cutoff(PREDICTION_PATH, cutoff)
    X_train, X_test = oof_predictions, lb_predictions
    new_cols = least_correlated_cols(X_train, num_least_correlated_cols)
    X_train, X_test = X_train[new_cols], X_test[new_cols]
    return X_train, y_train, X_test
예제 #2
0
def stacker_data_v2(cutoff, num_least_correlated_cols):
    X, y_train = load_data()
    oof_predictions, lb_predictions, oof_ginis = load_predictions_with_cutoff(
        PREDICTION_PATH, cutoff)
    X_train, X_test = oof_predictions, lb_predictions
    new_cols = least_correlated_cols(X_train, num_least_correlated_cols)
    X_train, X_test = X_train[new_cols], X_test[new_cols]
    return X_train, y_train, X_test
예제 #3
0
 def __init__(self, base_path, ensemble_func, cutoff=.38, column_picker_func=None,
         include=[], verbose=True, **column_picker_kwargs):
     self.ensemble_func = ensemble_func
     self.base_path = base_path
     self.cutoff = cutoff
     self.include = include
     self.verbose = verbose
     self.oof_predictions, self.lb_predictions, self.oof_ginis = load_predictions_with_cutoff(
         base_path, cutoff, include)
     if column_picker_func is not None:
         new_cols = column_picker_func(self.oof_predictions, **column_picker_kwargs)
         self.oof_predictions = self.oof_predictions[new_cols]
         self.lb_predictions = self.lb_predictions[new_cols]
예제 #4
0
 def __init__(self, base_path, opt_func=fmin_powell, cutoff=.38, column_picker_func=None,
         include=[], verbose=True, **kwargs):
     self.opt_func = opt_func
     self.base_path = base_path
     self.cutoff = cutoff
     self.include = include
     self.verbose = verbose
     self.kwargs = kwargs
     self.oof_predictions, self.lb_predictions, self.oof_ginis = load_predictions_with_cutoff(
         base_path, cutoff, include)
     if column_picker_func is not None:
         new_cols = column_picker_func(self.oof_predictions)
         self.oof_predictions = self.oof_predictions[new_cols]
         self.lb_predictions = self.lb_predictions[new_cols]
     self.opt_weights = None
예제 #5
0
 def __init__(self,
              base_path,
              ensemble_func,
              cutoff=.38,
              column_picker_func=None,
              include=[],
              verbose=True,
              **column_picker_kwargs):
     self.ensemble_func = ensemble_func
     self.base_path = base_path
     self.cutoff = cutoff
     self.include = include
     self.verbose = verbose
     self.oof_predictions, self.lb_predictions, self.oof_ginis = load_predictions_with_cutoff(
         base_path, cutoff, include)
     if column_picker_func is not None:
         new_cols = column_picker_func(self.oof_predictions,
                                       **column_picker_kwargs)
         self.oof_predictions = self.oof_predictions[new_cols]
         self.lb_predictions = self.lb_predictions[new_cols]
예제 #6
0
 def __init__(self,
              base_path,
              opt_func=fmin_powell,
              cutoff=.38,
              column_picker_func=None,
              include=[],
              verbose=True,
              **kwargs):
     self.opt_func = opt_func
     self.base_path = base_path
     self.cutoff = cutoff
     self.include = include
     self.verbose = verbose
     self.kwargs = kwargs
     self.oof_predictions, self.lb_predictions, self.oof_ginis = load_predictions_with_cutoff(
         base_path, cutoff, include)
     if column_picker_func is not None:
         new_cols = column_picker_func(self.oof_predictions)
         self.oof_predictions = self.oof_predictions[new_cols]
         self.lb_predictions = self.lb_predictions[new_cols]
     self.opt_weights = None
예제 #7
0
def stacker_data_v1(cutoff):
    X, y_train = load_data()
    oof_predictions, lb_predictions, oof_ginis = load_predictions_with_cutoff(PREDICTION_PATH, cutoff)
    X_train, X_test = oof_predictions, lb_predictions
    return X_train, y_train, X_test
예제 #8
0
def stacker_data_v1(cutoff):
    X, y_train = load_data()
    oof_predictions, lb_predictions, oof_ginis = load_predictions_with_cutoff(
        PREDICTION_PATH, cutoff)
    X_train, X_test = oof_predictions, lb_predictions
    return X_train, y_train, X_test