Comments (6)
Problem 1 will be fixed in #45
Problem 2 is because when training the final estimator in the stacked ensemble learner, the predictions from base learners are added as new features. Then the number of monotonic constraints will be unequal to the # features in the final estimator. When the selected final estimator does not have monotonic constraints this error won't appear. To make the monotonic constraints work in the final estimator, the number of monotonic constraints need to be revised based on X_train, e.g., in fit().
from flaml.
Thank you Chi. I see what you meant for problem 2. After checking the codes, it turns out that the ensemble is built using the estimator of the best base model as the final estimator with passthrough=True, causing the problem.
A few questions and thoughts:
-
Is it possible to let users specify the final_estimator and passthrough for the ensemble, please? In practice sometimes the only meta learner can be accepted by the business is GLM. Single boosting models are OK but a boosting model of boosting models is just too complicated for the legal team and regulators. Regarding the passthrough, there is no guarantee that one way will be better than the other so perhaps it is better to let the users decide.
-
Why does only the customized lightGBM cause this error? We've also built monotonic xgboost, RF and catboost; none of them triggered the error when used as the final_estimator. Does only lightGBM do a check on the number of features vs. length of monotone_constraint?
-
With the current setting, is there a way to solve this issue? Not sure how to specify a new monotone_constraint for the lightGBM only when it is used as the final_estimator.
Appreciate your help!
from flaml.
pass_through
is for original features. If you set pass_through=False, the original features will not be passed and the predictions are used as features for the final estimator. That won't solve the constraint mismatching problem.- Possibly.
- Override the
fit()
function of the customized lgbm estimator by changing the constraints before callingself._fit()
. Like:
def fit(self, X_train, y_train, budget=None, **kwargs):
# self.params['monotonic_constraints'] = ...
self._fit(X_train, y_train, **kwargs)
from flaml.
I understand. Passthrough is unrelated with this issue; just a side thought.
from flaml.
I understand. Passthrough is unrelated with this issue; just a side thought.
I created a separate issue #48 for this.
from flaml.
@flippercy I'm closing this issue now. If your problem is not solved feel free to reopen it.
from flaml.
Related Issues (20)
- Need estimators like support vector machine, Decision Tree, Naïve Bayes Classifier.
- How to change value of max_iter in Logistic Regression in AutoML ?
- Custom Objective Function for LGBM
- Where can I get the corresponding model for each cross validation
- Parameter tuning in final_estimator with automl ensemble
- couldn't get the same results with FLAML when using the original ML model HOT 1
- Represent "best error" in runtime logger instance using scientific notation?
- custom_metric() function error
- Preprocessing Data is missng ,raise key error. automl self was created data that is not repreat behaviour. HOT 1
- Typo or misnaming in automl/timeseries/ts_model.py
- Update Optuna
- Shifting of Time Series data
- BlendSearch in UDF mode
- Official example: Time Series Forecast TypeError: 'NoneType' object is not callable HOT 2
- ml.py contains conflicting references to Numpy
- Cannot reproduce Flaml predictions using SkLearn RF HOT 1
- Wrong index during CV
- Unable to work with root_mean_squared_log_error
- Inconsistent naming
- automl broken with pandas 2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flaml.