Beispiel #1
0
def check_regressor_data_not_an_array(name, estimator_orig):
    if name in ['TimeSeriesSVR']:
        return
    X, y = _boston_subset(n_samples=50)
    X = pairwise_estimator_convert_X(X, estimator_orig)
    y = enforce_estimator_tags_y(estimator_orig, y)
    check_estimators_data_not_an_array(name, estimator_orig, X, y)
Beispiel #2
0
def check_regressor_data_not_an_array(name, estimator_orig):
    if name in ['TimeSeriesSVR']:
        return
    X, y = _boston_subset(n_samples=50)
    X = pairwise_estimator_convert_X(X, estimator_orig)
    y = enforce_estimator_tags_y(estimator_orig, y)
    for obj_type in ["NotAnArray", "PandasDataframe"]:
        if obj_type == "PandasDataframe":
            X_ = X[:, :, 0]  # pandas df cant be 3d
        else:
            X_ = X
        check_estimators_data_not_an_array(name, estimator_orig, X_, y,
                                           obj_type)