Giter Site home page Giter Site logo

optgbm's People

Contributors

kmedved avatar y-ohr-n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

optgbm's Issues

test_fit_twice_without_study raises AssertionError

tmp_path = PosixPath('/tmp/pytest-of-root/pytest-6/test_fit_twice_without_study__0'), n_jobs = -1

    @pytest.mark.parametrize("n_jobs", [-1, 1])
    def test_fit_twice_without_study(tmp_path: pathlib.Path, n_jobs: int) -> None:
        X, y = load_breast_cancer(return_X_y=True)
    
        clf = OGBMClassifier(
            n_estimators=n_estimators,
            n_jobs=n_jobs,
            n_trials=n_trials,
            random_state=random_state,
            train_dir=tmp_path,
        )
    
        clf.fit(X, y)
    
        df = clf.study_.trials_dataframe()
        values = df["value"]
    
        clf = OGBMClassifier(
            bagging_fraction=1.0,
            bagging_freq=0,
            feature_fraction=1.0,
            lambda_l1=0.0,
            lambda_l2=0.0,
            min_data_in_leaf=20,
            n_estimators=n_estimators,
            n_jobs=n_jobs,
            n_trials=n_trials,
            random_state=random_state,
            train_dir=tmp_path,
        )
    
        clf.fit(X, y)
    
        df = clf.study_.trials_dataframe()
    
>       np.testing.assert_array_equal(values, df["value"])
E       AssertionError: 
E       Arrays are not equal
E       
E       Mismatched elements: 1 / 5 (20%)
E       Max absolute difference: 5.55111512e-17
E       Max relative difference: 1.84773566e-16
E        x: array([0.690443, 0.315822, 0.300428, 0.690443, 0.308651])
E        y: array([0.690443, 0.315822, 0.300428, 0.690443, 0.308651])

tests/test_sklearn.py:289: AssertionError

Extend search space

  • classification
    • is_unbalance
    • scale_pos_weight
  • regression
    • reg_sqrt
  • both
    • boosting_type
    • cat_smooth
    • extra_trees
    • learning_rate
    • min_child_weight
    • min_data_per_group

Implement CUI using Click

  • Add predict_proba with mlflow models
  • Generate a default config file
  • Log parameters with mlflow tracking
  • Manage an environment with mlflow projects
  • Perform user-defined preprocessing
  • Validate a recipe schema

Handle alias parameters

  • feature_fraction
    • sub_feature
    • colsample_bytree
  • max_depth
  • num_leaves
    • num_leaf
    • max_leaves
    • max_leaf
  • min_data_in_leaf
    • min_data_per_leaf
    • min_data
    • min_child_samples
  • lambda_l1
    • reg_alpha
  • lambda_l2
    • reg_lambda
    • lambda
  • boosting
    • boosting_type
    • boost
  • bagging_fraction
    • sub_row
    • subsample
    • bagging
  • bagging_freq
    • subsample_freq
  • seed
    • random_seed
    • random_state
  • verbosity
    • verbose
  • num_class
    • num_classes
  • objective
    • objective_typ
    • app
    • application
  • metric
    • metrics
    • metric_types
  • etc.

Documentation Help?

Hello - I'm a big fan of this package. It quickly matches the performance I get from much more complicated tuning approaches. However, I was wondering if it would be possible to improve the documentation somewhat? Specifically, I'm interested in seeing how I can see the final parameters selected by the model, and how early stopping is handled? Any other user exposed parameters would also be useful to see documented.

Thanks!

test_fit_with_empty_param_distributions raises AssertionError

tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/test_fit_with_empty_param_dist0')

    def test_fit_with_empty_param_distributions(tmp_path: pathlib.Path) -> None:
        X, y = load_breast_cancer(return_X_y=True)
    
        clf = OGBMClassifier(
            colsample_bytree=0.1,
            n_estimators=n_estimators,
            n_trials=n_trials,
            param_distributions={},
            train_dir=tmp_path,
        )
    
        clf.fit(X, y)
    
        df = clf.study_.trials_dataframe()
        values = df["value"]
    
>       assert values.nunique() == 1
E       assert 2 == 1
E        +  where 2 = <bound method IndexOpsMixin.nunique of 0    0.302962\n1    0.302962\n2    0.302962\n3    0.302962\n4    0.302962\nName: value, dtype: float64>()
E        +    where <bound method IndexOpsMixin.nunique of 0    0.302962\n1    0.302962\n2    0.302962\n3    0.302962\n4    0.302962\nName: value, dtype: float64> = 0    0.302962\n1    0.302962\n2    0.302962\n3    0.302962\n4    0.302962\nName: value, dtype: float64.nunique

tests/test_sklearn.py:182: AssertionError

LightGBMError: Cannot construct Dataset since there are no useful features

lightgbm.basic.LightGBMError: Cannot construct Dataset since there are no useful features.
It should be at least two unique rows.
If the num_row (num_data) is small, you can set min_data=1 and min_data_in_bin=1 to fix this.
Otherwise, please make sure you are using the right dataset

Versions

LightGBM: 2.2.1

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.