Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Add option to treat nans as mcar #65

Open
wants to merge 5 commits into
base: submodulev3
Choose a base branch
from

Fix lint

9816760
Select commit
Loading
Failed to load commit list.
Open

[DRAFT] Add option to treat nans as mcar #65

Fix lint
9816760
Select commit
Loading
Failed to load commit list.
Azure Pipelines / neurodata.scikit-learn failed Apr 4, 2024 in 22m 44s

Build #20240404.6 had test failures

Details

Tests

  • Failed: 14 (0.02%)
  • Passed: 66,557 (94.54%)
  • Other: 3,828 (5.44%)
  • Total: 70,399

Annotations

Check failure on line 1606 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / neurodata.scikit-learn

Build log #L1606

Bash exited with code '1'.

Check failure on line 1180 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / neurodata.scikit-learn

Build log #L1180

Bash exited with code '1'.

Check failure on line 1 in test_check_param_validation[ExtraTreeRegressor()]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / neurodata.scikit-learn

test_check_param_validation[ExtraTreeRegressor()]

AssertionError: Mismatch between _parameter_constraints and the parameters of ExtraTreeRegressor.
Consider the unexpected parameters {'missing_car'} and expected but missing parameters set()
Raw output
estimator = ExtraTreeRegressor()

    @pytest.mark.parametrize(
        "estimator",
        chain(
            _tested_estimators(),
            _generate_pipeline(),
            _generate_column_transformer_instances(),
            _generate_search_cv_instances(),
        ),
        ids=_get_check_estimator_ids,
    )
    def test_check_param_validation(estimator):
        name = estimator.__class__.__name__
        _set_checking_parameters(estimator)
>       check_param_validation(name, estimator)

estimator  = ExtraTreeRegressor()
name       = 'ExtraTreeRegressor'

../1/s/sklearn/tests/test_common.py:521: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'ExtraTreeRegressor', estimator_orig = ExtraTreeRegressor()

    def check_param_validation(name, estimator_orig):
        # Check that an informative error is raised when the value of a constructor
        # parameter does not have an appropriate type or value.
        rng = np.random.RandomState(0)
        X = rng.uniform(size=(20, 5))
        y = rng.randint(0, 2, size=20)
        y = _enforce_estimator_tags_y(estimator_orig, y)
    
        estimator_params = estimator_orig.get_params(deep=False).keys()
    
        # check that there is a constraint for each parameter
        if estimator_params:
            validation_params = estimator_orig._parameter_constraints.keys()
            unexpected_params = set(validation_params) - set(estimator_params)
            missing_params = set(estimator_params) - set(validation_params)
            err_msg = (
                f"Mismatch between _parameter_constraints and the parameters of {name}."
                f"\nConsider the unexpected parameters {unexpected_params} and expected but"
                f" missing parameters {missing_params}"
            )
>           assert validation_params == estimator_params, err_msg
E           AssertionError: Mismatch between _parameter_constraints and the parameters of ExtraTreeRegressor.
E           Consider the unexpected parameters {'missing_car'} and expected but missing parameters set()

X          = array([[0.5488135 , 0.71518937, 0.60276338, 0.54488318, 0.4236548 ],
       [0.64589411, 0.43758721, 0.891773  , 0.963... 0.66741038, 0.13179786, 0.7163272 , 0.28940609],
       [0.18319136, 0.58651293, 0.02010755, 0.82894003, 0.00469548]])
err_msg    = "Mismatch between _parameter_constraints and the parameters of ExtraTreeRegressor.\nConsider the unexpected parameters {'missing_car'} and expected but missing parameters set()"
estimator_orig = ExtraTreeRegressor()
estimator_params = dict_keys(['ccp_alpha', 'criterion', 'max_depth', 'max_features', 'max_leaf_nodes', 'min_impurity_decrease', 'min_samp...f', 'min_samples_split', 'min_weight_fraction_leaf', 'monotonic_cst', 'random_state', 'splitter', 'store_leaf_values'])
missing_params = set()
name       = 'ExtraTreeRegressor'
rng        = RandomState(MT19937) at 0x7FAC3D47C740
unexpected_params = {'missing_car'}
validation_params = dict_keys(['splitter', 'max_depth', 'min_samples_split', 'min_samples_leaf', 'min_weight_fraction_leaf', 'max_features...x_leaf_nodes', 'min_impurity_decrease', 'ccp_alpha', 'store_leaf_values', 'monotonic_cst', 'missing_car', 'criterion'])
y          = array([1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1])

../1/s/sklearn/utils/estimator_checks.py:4339: AssertionError

Check failure on line 1 in test_check_param_validation[ExtraTreesRegressor()]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / neurodata.scikit-learn

test_check_param_validation[ExtraTreesRegressor()]

AssertionError: Mismatch between _parameter_constraints and the parameters of ExtraTreesRegressor.
Consider the unexpected parameters {'missing_car'} and expected but missing parameters set()
Raw output
estimator = ExtraTreesRegressor(n_estimators=5)

    @pytest.mark.parametrize(
        "estimator",
        chain(
            _tested_estimators(),
            _generate_pipeline(),
            _generate_column_transformer_instances(),
            _generate_search_cv_instances(),
        ),
        ids=_get_check_estimator_ids,
    )
    def test_check_param_validation(estimator):
        name = estimator.__class__.__name__
        _set_checking_parameters(estimator)
>       check_param_validation(name, estimator)

estimator  = ExtraTreesRegressor(n_estimators=5)
name       = 'ExtraTreesRegressor'

../1/s/sklearn/tests/test_common.py:521: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'ExtraTreesRegressor'
estimator_orig = ExtraTreesRegressor(n_estimators=5)

    def check_param_validation(name, estimator_orig):
        # Check that an informative error is raised when the value of a constructor
        # parameter does not have an appropriate type or value.
        rng = np.random.RandomState(0)
        X = rng.uniform(size=(20, 5))
        y = rng.randint(0, 2, size=20)
        y = _enforce_estimator_tags_y(estimator_orig, y)
    
        estimator_params = estimator_orig.get_params(deep=False).keys()
    
        # check that there is a constraint for each parameter
        if estimator_params:
            validation_params = estimator_orig._parameter_constraints.keys()
            unexpected_params = set(validation_params) - set(estimator_params)
            missing_params = set(estimator_params) - set(validation_params)
            err_msg = (
                f"Mismatch between _parameter_constraints and the parameters of {name}."
                f"\nConsider the unexpected parameters {unexpected_params} and expected but"
                f" missing parameters {missing_params}"
            )
>           assert validation_params == estimator_params, err_msg
E           AssertionError: Mismatch between _parameter_constraints and the parameters of ExtraTreesRegressor.
E           Consider the unexpected parameters {'missing_car'} and expected but missing parameters set()

X          = array([[0.5488135 , 0.71518937, 0.60276338, 0.54488318, 0.4236548 ],
       [0.64589411, 0.43758721, 0.891773  , 0.963... 0.66741038, 0.13179786, 0.7163272 , 0.28940609],
       [0.18319136, 0.58651293, 0.02010755, 0.82894003, 0.00469548]])
err_msg    = "Mismatch between _parameter_constraints and the parameters of ExtraTreesRegressor.\nConsider the unexpected parameters {'missing_car'} and expected but missing parameters set()"
estimator_orig = ExtraTreesRegressor(n_estimators=5)
estimator_params = dict_keys(['bootstrap', 'ccp_alpha', 'criterion', 'max_bins', 'max_depth', 'max_features', 'max_leaf_nodes', 'max_samp... 'monotonic_cst', 'n_estimators', 'n_jobs', 'oob_score', 'random_state', 'store_leaf_values', 'verbose', 'warm_start'])
missing_params = set()
name       = 'ExtraTreesRegressor'
rng        = RandomState(MT19937) at 0x7FAC6CB5D140
unexpected_params = {'missing_car'}
validation_params = dict_keys(['n_estimators', 'bootstrap', 'oob_score', 'n_jobs', 'random_state', 'verbose', 'warm_start', 'max_samples',..., 'max_features', 'max_leaf_nodes', 'min_impurity_decrease', 'ccp_alpha', 'monotonic_cst', 'missing_car', 'criterion'])
y          = array([1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1])

../1/s/sklearn/utils/estimator_checks.py:4339: AssertionError

Check failure on line 1 in test_check_param_validation[GradientBoostingClassifier()]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / neurodata.scikit-learn

test_check_param_validation[GradientBoostingClassifier()]

AssertionError: Mismatch between _parameter_constraints and the parameters of GradientBoostingClassifier.
Consider the unexpected parameters {'missing_car'} and expected but missing parameters set()
Raw output
estimator = GradientBoostingClassifier(n_estimators=5)

    @pytest.mark.parametrize(
        "estimator",
        chain(
            _tested_estimators(),
            _generate_pipeline(),
            _generate_column_transformer_instances(),
            _generate_search_cv_instances(),
        ),
        ids=_get_check_estimator_ids,
    )
    def test_check_param_validation(estimator):
        name = estimator.__class__.__name__
        _set_checking_parameters(estimator)
>       check_param_validation(name, estimator)

estimator  = GradientBoostingClassifier(n_estimators=5)
name       = 'GradientBoostingClassifier'

../1/s/sklearn/tests/test_common.py:521: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'GradientBoostingClassifier'
estimator_orig = GradientBoostingClassifier(n_estimators=5)

    def check_param_validation(name, estimator_orig):
        # Check that an informative error is raised when the value of a constructor
        # parameter does not have an appropriate type or value.
        rng = np.random.RandomState(0)
        X = rng.uniform(size=(20, 5))
        y = rng.randint(0, 2, size=20)
        y = _enforce_estimator_tags_y(estimator_orig, y)
    
        estimator_params = estimator_orig.get_params(deep=False).keys()
    
        # check that there is a constraint for each parameter
        if estimator_params:
            validation_params = estimator_orig._parameter_constraints.keys()
            unexpected_params = set(validation_params) - set(estimator_params)
            missing_params = set(estimator_params) - set(validation_params)
            err_msg = (
                f"Mismatch between _parameter_constraints and the parameters of {name}."
                f"\nConsider the unexpected parameters {unexpected_params} and expected but"
                f" missing parameters {missing_params}"
            )
>           assert validation_params == estimator_params, err_msg
E           AssertionError: Mismatch between _parameter_constraints and the parameters of GradientBoostingClassifier.
E           Consider the unexpected parameters {'missing_car'} and expected but missing parameters set()

X          = array([[0.5488135 , 0.71518937, 0.60276338, 0.54488318, 0.4236548 ],
       [0.64589411, 0.43758721, 0.891773  , 0.963... 0.66741038, 0.13179786, 0.7163272 , 0.28940609],
       [0.18319136, 0.58651293, 0.02010755, 0.82894003, 0.00469548]])
err_msg    = "Mismatch between _parameter_constraints and the parameters of GradientBoostingClassifier.\nConsider the unexpected parameters {'missing_car'} and expected but missing parameters set()"
estimator_orig = GradientBoostingClassifier(n_estimators=5)
estimator_params = dict_keys(['ccp_alpha', 'criterion', 'init', 'learning_rate', 'loss', 'max_depth', 'max_features', 'max_leaf_nodes', '...n_estimators', 'n_iter_no_change', 'random_state', 'subsample', 'tol', 'validation_fraction', 'verbose', 'warm_start'])
missing_params = set()
name       = 'GradientBoostingClassifier'
rng        = RandomState(MT19937) at 0x7FAC6D01DE40
unexpected_params = {'missing_car'}
validation_params = dict_keys(['max_depth', 'min_samples_split', 'min_samples_leaf', 'min_weight_fraction_leaf', 'max_features', 'random_s...n_estimators', 'subsample', 'verbose', 'warm_start', 'validation_fraction', 'n_iter_no_change', 'tol', 'loss', 'init'])
y          = array([1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1])

../1/s/sklearn/utils/estimator_checks.py:4339: AssertionError

Check failure on line 1 in test_check_param_validation[GradientBoostingRegressor()]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / neurodata.scikit-learn

test_check_param_validation[GradientBoostingRegressor()]

AssertionError: Mismatch between _parameter_constraints and the parameters of GradientBoostingRegressor.
Consider the unexpected parameters {'missing_car'} and expected but missing parameters set()
Raw output
estimator = GradientBoostingRegressor(n_estimators=5)

    @pytest.mark.parametrize(
        "estimator",
        chain(
            _tested_estimators(),
            _generate_pipeline(),
            _generate_column_transformer_instances(),
            _generate_search_cv_instances(),
        ),
        ids=_get_check_estimator_ids,
    )
    def test_check_param_validation(estimator):
        name = estimator.__class__.__name__
        _set_checking_parameters(estimator)
>       check_param_validation(name, estimator)

estimator  = GradientBoostingRegressor(n_estimators=5)
name       = 'GradientBoostingRegressor'

../1/s/sklearn/tests/test_common.py:521: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'GradientBoostingRegressor'
estimator_orig = GradientBoostingRegressor(n_estimators=5)

    def check_param_validation(name, estimator_orig):
        # Check that an informative error is raised when the value of a constructor
        # parameter does not have an appropriate type or value.
        rng = np.random.RandomState(0)
        X = rng.uniform(size=(20, 5))
        y = rng.randint(0, 2, size=20)
        y = _enforce_estimator_tags_y(estimator_orig, y)
    
        estimator_params = estimator_orig.get_params(deep=False).keys()
    
        # check that there is a constraint for each parameter
        if estimator_params:
            validation_params = estimator_orig._parameter_constraints.keys()
            unexpected_params = set(validation_params) - set(estimator_params)
            missing_params = set(estimator_params) - set(validation_params)
            err_msg = (
                f"Mismatch between _parameter_constraints and the parameters of {name}."
                f"\nConsider the unexpected parameters {unexpected_params} and expected but"
                f" missing parameters {missing_params}"
            )
>           assert validation_params == estimator_params, err_msg
E           AssertionError: Mismatch between _parameter_constraints and the parameters of GradientBoostingRegressor.
E           Consider the unexpected parameters {'missing_car'} and expected but missing parameters set()

X          = array([[0.5488135 , 0.71518937, 0.60276338, 0.54488318, 0.4236548 ],
       [0.64589411, 0.43758721, 0.891773  , 0.963... 0.66741038, 0.13179786, 0.7163272 , 0.28940609],
       [0.18319136, 0.58651293, 0.02010755, 0.82894003, 0.00469548]])
err_msg    = "Mismatch between _parameter_constraints and the parameters of GradientBoostingRegressor.\nConsider the unexpected parameters {'missing_car'} and expected but missing parameters set()"
estimator_orig = GradientBoostingRegressor(n_estimators=5)
estimator_params = dict_keys(['alpha', 'ccp_alpha', 'criterion', 'init', 'learning_rate', 'loss', 'max_depth', 'max_features', 'max_leaf_...n_estimators', 'n_iter_no_change', 'random_state', 'subsample', 'tol', 'validation_fraction', 'verbose', 'warm_start'])
missing_params = set()
name       = 'GradientBoostingRegressor'
rng        = RandomState(MT19937) at 0x7FAC3D49C840
unexpected_params = {'missing_car'}
validation_params = dict_keys(['max_depth', 'min_samples_split', 'min_samples_leaf', 'min_weight_fraction_leaf', 'max_features', 'random_s...ors', 'subsample', 'verbose', 'warm_start', 'validation_fraction', 'n_iter_no_change', 'tol', 'loss', 'init', 'alpha'])
y          = array([1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1])

../1/s/sklearn/utils/estimator_checks.py:4339: AssertionError