:orphan: |rss_image| **machine learning - 1/1** :ref:`Blog ` :ref:`machine_learning (5) ` .. |rss_image| image:: feed-icon-16x16.png :target: ../_downloads/rss.xml :alt: RSS ---- .. index:: machine learning .. _ap-cat-machine_learning-0: machine learning - 1/1 ++++++++++++++++++++++ .. blogpostagg:: :title: Faster Polynomial Features :date: 2019-02-15 :keywords: scikit-learn,polynomial features :categories: machine learning :rawfile: 2019/2019-02-15_poly.rst The current implementation of `PolynomialFeatures `_ in *scikit-learn* computes each new feature independently and that increases the number of data exchanged between *numpy* and *Python*. The idea of the implementation in :class:`ExtendedFeatures ` is to reduce this number by brodcast multiplications. The second optimization occurs by transposing the matrix: dense matrix are organized by rows in memory so it is faster to mulitply two rows than two columns. See :ref:`fasterpolynomialfeaturesrst`. .. blogpostagg:: :title: Piecewise Linear Regression :date: 2019-02-10 :keywords: scikit-learn,linear regression,piecewise :categories: machine learning :rawfile: 2019/2019-02-10_piecewise.rst I decided to turn one of the notebook I wrote about `Piecewise Linear Regression `_. I wanted to turn my code into something usable and following the *scikit-learn* API: :class:`PiecewiseRegression ` and another notebook :ref:`piecewiselinearregressionrst`. .. blogpostagg:: :title: Predictable t-SNE :date: 2019-02-01 :keywords: scikit-learn,t-SNE :categories: machine learning :rawfile: 2019/2019-02-01_tsne.rst :epkg:`t-SNE` is quite an interesting tool to visualize data on a map but it has one drawback: results are not reproducible. It is much more powerful than a :epkg:`PCA` but the results is difficult to interpret. Based on some experiment, if :epkg:`t-SNE` manages to separate classes, there is a good chance that a classifier can get good performances. Anyhow, I implemented a regressor which approximates the :epkg:`t-SNE` outputs so that it can be used as features for a further classifier. I create a notebook :ref:`predictabletsnerst` and a new tranform :class:`PredictableTSNE `. .. blogpostagg:: :title: Pipeline visualization :date: 2019-02-01 :keywords: scikit-learn,pipeline :categories: machine learning :rawfile: 2019/2019-02-01_pipeline.rst :epkg:`scikit-learn` introduced nice feature to be able to process mixed type column in a single pipeline which follows :epkg:`scikit-learn` API: `ColumnTransformer `_ `FeatureUnion `_ and `Pipeline `_. Ideas are not new but it is finally taking place in :epkg:`scikit-learn`. ... .. blogpostagg:: :title: Quantile regression with scikit-learn. :date: 2018-05-07 :keywords: scikit-learn,quantile regression :categories: machine learning :rawfile: 2018/2018-05-07_quantile_regression.rst :epkg:`scikit-learn` does not have any quantile regression. :epkg:`statsmodels` does have one `QuantReg `_ but I wanted to try something I did for my teachings `RĂ©gression Quantile `_ based on `Iteratively reweighted least squares `_. I thought it was a good case study to turn a simple algorithm into a learner :epkg:`scikit-learn` can reused in a pipeline. The notebook :ref:`quantileregressionrst` demonstrates it and it is implemented in :class:`QuantileLinearRegression `. ---- |rss_image| **machine learning - 1/1** :ref:`2018-05 (1) ` :ref:`2019-02 (4) ` :ref:`2019-03 (1) ` :ref:`2020-09 (1) ` :ref:`2021-01 (1) `