def create_score_csv_default_HP(scaler_):

    n_comp_pca = None
    #whiten_ = False
    random_state_clf = 'not_present'
    #random_state_PCA = 42
    random_state_outer_kf = 2

    dict_best_params = {
        'SCALER': [scaler_],
        'PCA__n_components': [n_comp_pca],
        'CLF__random_state': [random_state_clf],
        'random_state_outer_kf': [random_state_outer_kf]
    }

    df_best_params = pd.DataFrame.from_dict(dict_best_params)

    #implmentation of steps
    scaler = scaler_
    #pca = PCA(n_components=n_comp_pca, whiten=whiten_, random_state=random_state_PCA)
    clf = QuadraticDiscriminantAnalysis()

    steps = [('scaler', scaler), ('clf', clf)]
    pipeline = Pipeline(steps)

    df_score_value, df_mean_std = score_cv_3_classes.function_score_cv_3_classes(
        public_data, public_labels, pipeline)
    df_tot = pd.concat([df_best_params, df_score_value, df_mean_std],
                       axis=1,
                       ignore_index=False)

    return df_tot
Example #2
0
def create_score_csv_default_HP(scaler_):


    n_comp_pca = None
    #whiten_ = False
    depth_= 'default'
    algorithm_ = 'default'
    lr = 'default'
    n_estimators_ = 'default'
    random_state_clf = 503
    #random_state_PCA = 42
    random_state_outer_kf = 2

    dict_best_params = {'SCALER':[scaler_], 'PCA__n_components':[n_comp_pca],  
                        'CLF__algorithm':[algorithm_], 'CLF__lr':[lr], 'CLF__n_estimators':[n_estimators_],
                        'CLF__base_estimator_DTC_max_depth':[depth_],
                        'CLF__random_state':[random_state_clf], 'random_state_outer_kf':[random_state_outer_kf]}


    df_best_params = pd.DataFrame.from_dict(dict_best_params)

    #implmentation of steps
    scaler=scaler_
    #pca = PCA(n_components=n_comp_pca, whiten=whiten_, random_state=random_state_PCA)
    clf = AdaBoostClassifier(random_state=random_state_clf)

    steps = [('scaler', scaler), ('clf', clf)]    
    pipeline = Pipeline(steps)

    df_score_value, df_mean_std = score_cv_3_classes.function_score_cv_3_classes(public_data, public_labels, pipeline)
    df_tot = pd.concat([df_best_params, df_score_value, df_mean_std], axis=1, ignore_index=False)


    return df_tot
def create_score_csv_default_HP(scaler_):


    n_comp_pca = None
    #whiten_ = True
    C_ = 'default'
    gamma_ = 'default'
    class_weight_ = 'default'
    random_state_clf = 503
    #random_state_PCA = 42
    random_state_outer_kf = 2


    dict_best_params = {'SCALER':[scaler_], 'PCA__n_components':[n_comp_pca],
                        'CLF__C':[C_], 'CLF__class_weight':[class_weight_], 'CLF__gamma':[gamma_], 
                        'CLF__random_state':[random_state_clf], 'random_state_outer_kf':[random_state_outer_kf]}


    df_best_params = pd.DataFrame.from_dict(dict_best_params)

    #implmentation of steps
    scaler=scaler_
    #pca = PCA(n_components=n_comp_pca, whiten=whiten_, random_state=random_state_PCA)
    svm = SVC(kernel='sigmoid', probability=True, random_state=random_state_clf)
    

    steps = [('scaler', scaler), ('clf', svm)]    
    pipeline = Pipeline(steps)


    df_score_value, df_mean_std = score_cv_3_classes.function_score_cv_3_classes(public_data, public_labels, pipeline)
    df_tot=pd.concat([df_best_params, df_score_value, df_mean_std], axis=1, ignore_index=False)


    return df_tot
def create_score_csv_default_HP(scaler_):

    n_comp_pca = None
    #whiten_ = False
    n_estimators_ = 'default'
    criterion_ = 'default'
    bootstrap_ = 'default'
    max_depth_ = 'default'
    min_samples_split_ = 'default'
    min_samples_leaf_ = 'default'
    class_weight_ = 'default'
    random_state_clf = 503
    #random_state_PCA = 42
    random_state_outer_kf = 2

    dict_best_params = {
        'SCALER': [scaler_],
        'PCA__n_components': [n_comp_pca],
        'CLF__n_estimators': [n_estimators_],
        'CLF__criterion': [criterion_],
        'CLF__bootstrap': [bootstrap_],
        'CLF__max_depth': [max_depth_],
        'CLF__min_samples_split': [min_samples_split_],
        'CLF__min_samples_leaf': [min_samples_leaf_],
        'CLF__class_weight': [class_weight_],
        'CLF__random_state': [random_state_clf],
        'random_state_outer_kf': [random_state_outer_kf]
    }

    df_best_params = pd.DataFrame.from_dict(dict_best_params)

    #implmentation of steps
    scaler = scaler_
    #pca = PCA(n_components=n_comp_pca, whiten=whiten_, random_state=random_state_PCA)
    clf = RandomForestClassifier(random_state=random_state_clf)

    steps = [('scaler', scaler), ('clf', clf)]
    pipeline = Pipeline(steps)

    df_score_value, df_mean_std = score_cv_3_classes.function_score_cv_3_classes(
        public_data, public_labels, pipeline)
    df_tot = pd.concat([df_best_params, df_score_value, df_mean_std],
                       axis=1,
                       ignore_index=False)

    return df_tot
Example #5
0
def create_score_csv_default_HP(scaler_):

    n_comp_pca = None
    #whiten_ = True
    algorithm_ = 'default'
    radius_ = 'default'
    weights_ = 'default'
    random_state_clf = 'not_present'
    #random_state_PCA = 42
    random_state_outer_kf = 2

    dict_best_params = {
        'SCALER': [scaler_],
        'PCA__n_components': [n_comp_pca],
        'CLF__algorithm': [algorithm_],
        'CLF__radius': [radius_],
        'CLF__weights': [weights_],
        'CLF__random_state': [random_state_clf],
        'random_state_outer_kf': [random_state_outer_kf]
    }

    df_best_params = pd.DataFrame.from_dict(dict_best_params)

    #implmentation of steps
    scaler = scaler_
    #pca = PCA(n_components=n_comp_pca, whiten=whiten_, random_state=random_state_PCA)
    clf = RadiusNeighborsClassifier(outlier_label='most_frequent')

    steps = [('scaler', scaler), ('clf', clf)]
    pipeline = Pipeline(steps)

    df_score_value, df_mean_std = score_cv_3_classes.function_score_cv_3_classes(
        public_data, public_labels, pipeline)
    df_tot = pd.concat([df_best_params, df_score_value, df_mean_std],
                       axis=1,
                       ignore_index=False)

    return df_tot