Giter VIP home page Giter VIP logo

Comments (4)

jameslamb avatar jameslamb commented on August 23, 2024 1

By the way, I reformatted your follow-up question. If you're unsure how I did that, please see https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.

from lightgbm.

jameslamb avatar jameslamb commented on August 23, 2024

Thanks for using LightGBM.

As described at https://lightgbm.readthedocs.io/en/latest/Parameters.html#data_sample_strategy, GOSS can be specified via data_sample_strategy. That change was made in LightGBM #4827, as part of v4.0.0 (https://github.com/microsoft/LightGBM/releases/tag/v4.0.0).

Here's a minimal, reproducible example:

import lightgbm as lgb
from sklearn.datasets import make_regression

X, y = make_regression(n_samples=10_000, n_features=10)
reg = lgb.LGBMRegressor(
  n_estimators=10,
  data_sample_strategy="goss"
)
reg.fit(X, y)

If you do that, you'll see this in the logs:

[LightGBM] [Info] Using GOSS

from lightgbm.

luxiangyuricardo avatar luxiangyuricardo commented on August 23, 2024

got it! Thanks a lot.Now I have a new question:
In the doc LightGBM regressor includes following params:

__init__(boosting_type='gbdt', num_leaves=31, max_depth=-1, learning_rate=0.1, n_estimators=100, subsample_for_bin=200000, objective=None, class_weight=None, min_split_gain=0.0, min_child_weight=0.001, min_child_samples=20, subsample=1.0, subsample_freq=0, colsample_bytree=1.0, reg_alpha=0.0, reg_lambda=0.0, random_state=None, n_jobs=None, importance_type='split', **kwargs)

But no data_sample_strategy inside.

Why can it be directly changed?

from lightgbm.

jameslamb avatar jameslamb commented on August 23, 2024

But no 'data_sample_strategy' inside.Why can it be directly changed?

Any other parameters passed to the constructor of LGBMRegressor which don't match its keyword arguments will be collected together and sent to LightGBM's C++ library as additional parameters.

As it says at https://lightgbm.readthedocs.io/en/latest/pythonapi/lightgbm.LGBMRegressor.html:

**kwargs

Other parameters for the model. Check http://lightgbm.readthedocs.io/en/latest/Parameters.html for more parameters.

from lightgbm.

Related Issues (20)

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.