Skip to content

Commit

Permalink
Add neural networks and bug fixes (#79)
Browse files Browse the repository at this point in the history
* fix kfold and reader seeds

* fix deprecated series append

* add FillnaMean and QuantileTransformer

* fix verbose

* add debug option in preset

* fix weight in metric func

* add grad clipping

* add nn feature pipeline

* add linear with logit losses

* add neural networks

* add DLOptunaTuner

* add nn in tabular preset

* add nn in text preset

* fix verbose

* update modules rst

* add nn tutorial

* add tps nn solution link

* add verbose_bar option

* add default_nn_params_v2

* reformat

* fix cb custom multitask metric

* fix links

* add nn in TabularUtilizedAutoML

* reformat tutorial

* add freeze_defaults param

* add docs

* add params on input

* fix mapping when targets are sorted right

* add zero_grad to the end of loop
  • Loading branch information
MikhailKuz authored Mar 16, 2023
1 parent 54666e4 commit f2ef45e
Show file tree
Hide file tree
Showing 55 changed files with 4,883 additions and 305 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ LighAutoML framework has a lot of ready-to-use parts and extensive customization
- [Tabular Playground Series February 2021 competition solution](https://www.kaggle.com/alexryzhkov/lightautoml-tabulardata-love)
- [Interpretable WhiteBox solution](https://www.kaggle.com/simakov/lama-whitebox-preset-example)
- [Custom ML pipeline elements inside existing ones](https://www.kaggle.com/simakov/lama-custom-automl-pipeline-example)
- [Custom ML pipeline elements inside existing ones](https://www.kaggle.com/simakov/lama-custom-automl-pipeline-example)
- [Tabular Playground Series November 2022 competition solution with Neural Networks](https://www.kaggle.com/code/mikhailkuz/lightautoml-nn-happiness)

### Google Colab tutorials and [other examples](examples/):

Expand All @@ -134,6 +136,7 @@ LighAutoML framework has a lot of ready-to-use parts and extensive customization
- [`Tutorial_6_custom_pipeline.ipynb`](https://colab.research.google.com/github/AILab-MLTools/LightAutoML/blob/master/examples/tutorials/Tutorial_6_custom_pipeline.ipynb) - shows how to create your own pipeline from specified blocks: pipelines for feature generation and feature selection, ML algorithms, hyperparameter optimization etc.
- [`Tutorial_7_ICE_and_PDP_interpretation.ipynb`](https://colab.research.google.com/github/AILab-MLTools/LightAutoML/blob/master/examples/tutorials/Tutorial_7_ICE_and_PDP_interpretation.ipynb) - shows how to obtain local and global interpretation of model results using ICE and PDP approaches.
- [`Tutorial_8_CV_preset.ipynb`](https://colab.research.google.com/github/AILab-MLTools/LightAutoML/blob/master/examples/tutorials/Tutorial_8_CV_preset.ipynb) - example of using TabularCVAutoML preset in CV multi-class classification task.
- [`Tutorial_9_neural_networks.ipynb`](https://colab.research.google.com/github/AILab-MLTools/LightAutoML/blob/master/examples/tutorials/Tutorial_9_neural_networks.ipynb) - example of using Tabular preset with neural networks.


**Note 1**: for production you have no need to use profiler (which increase work time and memory consomption), so please do not turn it on - it is in off state by default
Expand Down
1 change: 1 addition & 0 deletions docs/pages/Kaggle_Kernels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Kaggle Kernels
* `Tabular Playground Series February 2021 competition solution <https://www.kaggle.com/alexryzhkov/lightautoml-tabulardata-love>`_
* `Interpretable WhiteBox solution <https://www.kaggle.com/simakov/lama-whitebox-preset-example>`_
* `Custom ML pipeline elements inside existing ones <https://www.kaggle.com/simakov/lama-custom-automl-pipeline-example>`_
* `Tabular Playground Series November 2022 competition solution with Neural Networks <https://www.kaggle.com/code/mikhailkuz/lightautoml-nn-happiness>`_
1 change: 1 addition & 0 deletions docs/pages/Python-API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Python-API
modules/image
modules/ml_algo
modules/ml_algo.tuning
modules/ml_algo.torch_based
modules/pipelines
modules/pipelines.selection
modules/pipelines.features
Expand Down
1 change: 1 addition & 0 deletions docs/pages/Tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Tutorials
tutorials/Tutorial_6_custom_pipeline.nblink
tutorials/Tutorial_7_ICE_and_PDP_interpretation.nblink
tutorials/Tutorial_8_CV_preset.nblink
tutorials/Tutorial_9_neural_networks.nblink
18 changes: 18 additions & 0 deletions docs/pages/modules/ml_algo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@ Boosted Trees
~boost_lgbm.BoostLGBM
~boost_cb.BoostCB


Neural Networks
-------------------------

.. currentmodule:: lightautoml.ml_algo.torch_based

.. autosummary::
:toctree: ./generated
:nosignatures:
:template: classtemplate.rst

~nn_models.MLP
~nn_models.DenseLightModel
~nn_models.DenseModel
~nn_models.ResNetModel
~nn_models.SNN


WhiteBox
-------------------------

Expand Down
24 changes: 24 additions & 0 deletions docs/pages/modules/ml_algo.torch_based.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. role:: hidden
:class: hidden-section

lightautoml.ml_algo
===================

Torch utils.

Pooling Strategies
------------------------------

.. currentmodule:: lightautoml.ml_algo.torch_based.nn_models

.. autosummary::
:toctree: ./generated
:nosignatures:
:template: classtemplate.rst

SequenceAbstractPooler
SequenceClsPooler
SequenceMaxPooler
SequenceSumPooler
SequenceAvgPooler
SequenceIndentityPooler
1 change: 1 addition & 0 deletions docs/pages/modules/ml_algo.tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ Tuning with Optuna
:template: classtemplate.rst

OptunaTuner
DLOptunaTuner
13 changes: 13 additions & 0 deletions docs/pages/modules/pipelines.features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,16 @@ Text Feature Pipelines
TextAutoFeatures
NLPTFiDFFeatures
TextBertFeatures


Feature Pipelines for Neural Networks Models
------------------------------------------------------

.. currentmodule:: lightautoml.pipelines.features.torch_pipeline

.. autosummary::
:toctree: ./generated
:nosignatures:
:template: classtemplate.rst

TorchSimpleFeatures
18 changes: 0 additions & 18 deletions docs/pages/modules/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,6 @@ Tokenizers
~tokenizer.SimpleEnTokenizer


Pooling Strategies
------------------------------

.. currentmodule:: lightautoml.text

.. autosummary::
:toctree: ./generated
:nosignatures:
:template: classtemplate.rst

~sentence_pooling.SequenceAbstractPooler
~sentence_pooling.SequenceClsPooler
~sentence_pooling.SequenceMaxPooler
~sentence_pooling.SequenceSumPooler
~sentence_pooling.SequenceAvgPooler
~sentence_pooling.SequenceIndentityPooler


Utils
------------------------------

Expand Down
2 changes: 2 additions & 0 deletions docs/pages/modules/transformers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ Numeric

NaNFlags
FillnaMedian
FillnaMean
FillInf
LogOdds
StandardScaler
QuantileBinning
QuantileTransformer


Categorical
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/tutorials/Tutorial_9_neural_networks.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../../examples/tutorials/Tutorial_9_neural_networks.ipynb"
}
Loading

0 comments on commit f2ef45e

Please sign in to comment.