GithubHelp home page GithubHelp logo

Comments (1)

WojciechMigda avatar WojciechMigda commented on June 22, 2024

Error message on Travis:

=================================== FAILURES ===================================
____________________ test_classifier_passes_check_estimator ____________________

    def test_classifier_passes_check_estimator():
        from sklearn.utils.estimator_checks import check_estimator
    
>       check_estimator(XTsetlinMachineClassifier)

tests/test_check_estimator.py:88: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../virtualenv/python3.8.0/lib/python3.8/site-packages/sklearn/utils/estimator_checks.py:502: in check_estimator
    check(estimator)
../../../virtualenv/python3.8.0/lib/python3.8/site-packages/sklearn/utils/_testing.py:317: in wrapper
    return fn(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

name = 'XTsetlinMachineClassifier', estimator_orig = XTsetlinMachineClassifier()

    @ignore_warnings(category=FutureWarning)
    def check_estimators_nan_inf(name, estimator_orig):
        # Checks that Estimator X's do not contain NaN or inf.
        rnd = np.random.RandomState(0)
        X_train_finite = _pairwise_estimator_convert_X(rnd.uniform(size=(10, 3)),
                                                      estimator_orig)
        X_train_nan = rnd.uniform(size=(10, 3))
        X_train_nan[0, 0] = np.nan
        X_train_inf = rnd.uniform(size=(10, 3))
        X_train_inf[0, 0] = np.inf
        y = np.ones(10)
        y[:5] = 0
        y = _enforce_estimator_tags_y(estimator_orig, y)
        error_string_fit = "Estimator doesn't check for NaN and inf in fit."
        error_string_predict = ("Estimator doesn't check for NaN and inf in"
                                " predict.")
        error_string_transform = ("Estimator doesn't check for NaN and inf in"
                                  " transform.")
        for X_train in [X_train_nan, X_train_inf]:
            # catch deprecation warnings
            with ignore_warnings(category=FutureWarning):
                estimator = clone(estimator_orig)
                set_random_state(estimator, 1)
                # try to fit
                try:
                    estimator.fit(X_train, y)
                except ValueError as e:
                    if 'inf' not in repr(e) and 'NaN' not in repr(e):
                        print(error_string_fit, estimator, e)
                        traceback.print_exc(file=sys.stdout)
                        raise e
                except Exception as exc:
                    print(error_string_fit, estimator, exc)
                    traceback.print_exc(file=sys.stdout)
                    raise exc
                else:
>                   raise AssertionError(error_string_fit, estimator)
E                   AssertionError: ("Estimator doesn't check for NaN and inf in fit.", XTsetlinMachineClassifier(random_state=1))

../../../virtualenv/python3.8.0/lib/python3.8/site-packages/sklearn/utils/estimator_checks.py:1494: AssertionError

from pytsetlini.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.