Пример #1
0
def test_GroupPCADecisionTreeClassifier():
    klass = GroupPCADecisionTreeClassifier
    model_kwargs = {}

    np.random.seed(1)
    verif_model(
        df1,
        df2,
        y1,
        klass,
        model_kwargs,
        all_types=(DataTypes.DataFrame, DataTypes.NumpyArray
                   ),  # , DataTypes.SparseArray, DataTypes.SparseDataFrame),
        is_classifier=True,
    )
Пример #2
0
def test_RandomRotationForestClassifier():
    klass = RandomRotationForestClassifier
    model_kwargs = {}

    np.random.seed(2)

    verif_model(
        df1,
        df2,
        y1,
        klass,
        model_kwargs,
        all_types=(DataTypes.DataFrame, DataTypes.NumpyArray
                   ),  # , DataTypes.SparseArray, DataTypes.SparseDataFrame),
        is_classifier=True,
    )
Пример #3
0
def test_GroupPCADecisionTreeRegressor():
    # klass = DecisionTreeClassifier
    klass = GroupPCADecisionTreeRegressor
    model_kwargs = {}

    np.random.seed(3)

    verif_model(
        df1_reg,
        df2_reg,
        y1_reg,
        klass,
        model_kwargs,
        all_types=(DataTypes.DataFrame, DataTypes.NumpyArray
                   ),  # , DataTypes.SparseArray, DataTypes.SparseDataFrame),
        is_classifier=False,
    )
def test_WaveRandomForestRegressor():
    klass = WaveRandomForestRegressor

    model_kwargs = {}

    np.random.seed(4)

    verif_model(
        df1_reg,
        df2_reg,
        y1_reg,
        klass,
        model_kwargs,
        all_types=(DataTypes.DataFrame, DataTypes.NumpyArray
                   ),  # , DataTypes.SparseArray, DataTypes.SparseDataFrame),
        is_classifier=False,
    )
Пример #5
0
def test_GroupPCADecisionTreeClassifier_with_params(random_state, max_depth,
                                                    criterion, pca_bootstrap):
    klass = GroupPCADecisionTreeClassifier

    model_kwargs = {
        "max_depth": max_depth,
        "criterion": criterion,
        "pca_bootstrap": pca_bootstrap,
        "random_state": random_state,
    }

    verif_model(
        df1,
        df2,
        y1,
        klass,
        model_kwargs,
        all_types=(DataTypes.DataFrame, DataTypes.NumpyArray
                   ),  # , DataTypes.SparseArray, DataTypes.SparseDataFrame),
        is_classifier=True,
    )
Пример #6
0
def test_RandomRotationForestRegressor_with_params(random_state, max_depth,
                                                   criterion, pca_bootstrap):

    klass = RandomRotationForestRegressor

    model_kwargs = {
        "max_depth": max_depth,
        "criterion": criterion,
        "pca_bootstrap": pca_bootstrap,
        "random_state": random_state,
    }

    verif_model(
        df1,
        df2,
        y1,
        klass,
        model_kwargs,
        all_types=(DataTypes.DataFrame, DataTypes.NumpyArray
                   ),  # , DataTypes.SparseArray, DataTypes.SparseDataFrame),
        is_classifier=False,
    )
def test_WaveRandomForestClassifier_with_params(random_state, max_depth,
                                                criterion, nodes_to_keep):

    klass = WaveRandomForestClassifier

    model_kwargs = {
        "max_depth": max_depth,
        "criterion": criterion,
        "nodes_to_keep": nodes_to_keep,
        "random_state": random_state,
    }

    verif_model(
        df1,
        df2,
        y1,
        klass,
        model_kwargs,
        all_types=(DataTypes.DataFrame, DataTypes.NumpyArray
                   ),  # , DataTypes.SparseArray, DataTypes.SparseDataFrame),
        is_classifier=True,
    )