Combine sklearn pipeline with keras or lightgbm
See original GitHub issueHello! It’s possible to use pipeline
for preparing data and on top of that keras
or lightgbm
model?
It is not clear for me - which convert function I should choose for this operation
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Using keras models with scikit-learn pipelines - Kaggle
In this code, we will perform cross validation on the Keras model accuracy using the StatifiedKFold method in the sklearn library.
Read more >Transfer Learning with ONNX
It is not quite easy in this case to mix framework, scikit-learn with pytorch (or skorch), the Keras API for Tensorflow, tf.keras.wrappers.scikit_learn.
Read more >Gradient Boosting with Scikit-Learn, XGBoost, LightGBM, and ...
Gradient boosting refers to a class of ensemble machine learning algorithms that can be used for classification or regression predictive ...
Read more >How to build pipeline with grid search cv and early stopping ...
Here is my code. It start with pipeline (standardizing,replace null value,onehotencoding and selectkbest) with lightgbm model to fit my data ...
Read more >Extracting Feature Importances from Scikit-Learn Pipelines
Scikit-learn pipelines provide a really simple way to chain together the preprocessing steps with the model fitting stages in machine ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@xadupre: I was also not able to export a pipeline that contains a scikit_learn.KerasClassifier. I’m getting the following error: Unable to find a shape calculator for type ‘<class ‘keras.wrappers.scikit_learn.KerasClassifier’>’. Could you please provide an example or add a statement, that this is the scikit_learn.KerasClassifier is currently not supported.
We are currently refactoring onnxmltools and keras converters. The mechanism will be same (you need to register a new converter) but it should be more simple. The custom shape calculator should disappear to be replaced by a version coming from onnxmltools. So this line will remain:
update_registered_converter(LGBMClassifier, ‘LightGbmLGBMClassifier’,
lightgbm_classifier_shape_extractor, convert_lightgbm)
But you won’t have to implement lightgbm_classifier_shape_extractor.