Release History

Release notes for current and recent releases are detailed on this page, with previous releases linked below.

Tip: Subscribe to scikit-learn releases on libraries.io to be notified when new versions are released.

Version 0.20 (under development)

This release packs in a mountain of bug fixes, features and enhancements for the Scikit-learn library, and improvements to the documentation and examples. Thanks to our many contributors!

Warning

Version 0.20 is the last version of scikit-learn to support Python 2.7 and Python 3.4. Scikit-learn 0.21 will require Python 3.5 or higher.

Highlights

We have tried to improve our support for common data-science use-cases including missing values, categorical variables, heterogeneous data, and features/targets with unusual distributions. Missing values in features, represented by NaNs, are now accepted in column-wise preprocessing such as scalers. Each feature is fitted disregarding NaNs, and data containing NaNs can be transformed. The new impute module provides estimators for learning despite missing data.

ColumnTransformer handles the case where different features or columns of a pandas.DataFrame need different preprocessing. String or pandas Categorical columns can now be encoded with OneHotEncoder or OrdinalEncoder.

TransformedTargetRegressor helps when the regression target needs to be transformed to be modeled. PowerTransformer and KBinsDiscretizer join QuantileTransformer as non-linear transformations.

Beyond this, we have added sample_weight support to several estimators (including KMeans, BayesianRidge and KernelDensity) and improved stopping criteria in others (including MLPRegressor, GradientBoostingRegressor and SGDRegressor).

This release is also the first to be accompanied by a Glossary of Common Terms and API Elements developed by Joel Nothman. The glossary is a reference resource to help users and contributors become familiar with the terminology and conventions used in Scikit-learn.

Changed models

The following estimators and functions, when fit with the same data and parameters, may produce different models from the previous version. This often occurs due to changes in the modelling logic (bug fixes or enhancements), or in random sampling procedures.

Details are listed in the changelog below.

(While we are trying to better inform users by providing this information, we cannot assure that this list is complete.)

Changelog

Support for Python 3.3 has been officially dropped.

New features

Classifiers and regressors

Preprocessing

Model evaluation

Decomposition, manifold learning and clustering

Metrics

Misc

Enhancements

Classifiers and regressors

Cluster

Datasets

Preprocessing

Model evaluation and meta-estimators

Decomposition and manifold learning

Metrics

Linear, kernelized and related models

Preprocessing and feature selection

Decomposition, manifold learning and clustering

  • Deprecate precomputed parameter in function manifold.t_sne.trustworthiness. Instead, the new parameter metric should be used with any compatible metric including ‘precomputed’, in which case the input matrix X should be a matrix of pairwise distances or squared distances. #9775 by William de Vazelhes.

Utils

Miscellaneous

Bug fixes

Classifiers and regressors

Decomposition, manifold learning and clustering

Metrics

Ensemble

  • Fix allowing to obtain deterministic with BaseBagging estimator, when comparing results generated at fit time with the one using the object attributes when random_state is set. #9723 by Guillaume Lemaitre.

Neighbors

Feature Extraction

Utils

  • utils.check_array yield a FutureWarning indicating that arrays of bytes/strings will be interpreted as decimal numbers beginning in version 0.22. #10229 by Ryan Lee

Preprocessing

Feature selection

Model evaluation and meta-estimators

Datasets

API changes summary

Classifiers and regressors

Linear, kernelized and related models

Preprocessing

  • Deprecate n_values and categorical_features parameters and active_features_, feature_indices_ and n_values_ attributes of preprocessing.OneHotEncoder. The n_values parameter can be replaced with the new categories parameter, and the attributes with the new categories_ attribute. Selecting the categorical features with the categorical_features parameter is now better supported using the compose.ColumnTransformer. #10521 by Joris Van den Bossche.

Decomposition, manifold learning and clustering

  • Deprecate precomputed parameter in function manifold.t_sne.trustworthiness. Instead, the new parameter metric should be used with any compatible metric including ‘precomputed’, in which case the input matrix X should be a matrix of pairwise distances or squared distances. #9775 by William de Vazelhes.
  • Added function fit_predict to mixture.GaussianMixture and mixture.GaussianMixture, which is essentially equivalent to calling fit and predict. #10336 by Shu Haoran and Andrew Peng.

Metrics

  • Deprecate reorder parameter in metrics.auc as it’s no longer required for metrics.roc_auc_score. Moreover using reorder=True can hide bugs due to floating point error in the input. #9851 by Hanmin Qin.
  • In metrics.normalized_mutual_information_score and metrics.adjusted_mutual_information_score, warn that average_method will have a new default value. In version 0.22, the default normalizer for each will become the arithmetic mean of the entropies of each clustering. Currently, metrics.normalized_mutual_information_score uses the default of average_method='geometric', and metrics.adjusted_mutual_information_score uses the default of average_method='max' to match their behaviors in version 0.19. #11124 by Arya McCarthy.
  • The batch_size parameter to metrics.pairwise_distances_argmin_min and metrics.pairwise_distances_argmin is deprecated to be removed in v0.22. It no longer has any effect, as batch size is determined by global working_memory config. See Limiting Working Memory. #10280 by Joel Nothman and Aman Dalmia.

Cluster

Ensemble

  • Classes derived from ensemble.BaseBagging. The attribute estimators_samples_ will return a list of arrays containing the indices selected for each bootstrap instead of a list of arrays containing the mask of the samples selected for each bootstrap. Indices allows to repeat samples while mask does not allow this functionality. #9524 by Guillaume Lemaitre.

Imputer

Outlier Detection models

to ensure backward compatibility. In the old behaviour, the decision_function is independent of the contamination parameter. A threshold attribute depending on the contamination parameter is thus used. In the new behaviour the decision_function is dependent on the contamination parameter, in such a way that 0 becomes its natural threshold to detect outliers. Setting behaviour to “old” is deprecated and will not be possible in version 0.22. Beside, the behaviour parameter will be removed in 0.24. #11553 by Nicolas Goix.

Covariance

Misc

Preprocessing

Model selection

  • The default number of cross-validation folds cv and the default number of splits n_splits in the model_selection.KFold-like splitters will change from 3 to 5 in 0.22 as 3-fold has a lot of variance. #11557 by Alexandre Boucaud.

Changes to estimator checks

These changes mostly affect library developers.

Version 0.19.2

July, 2018

This release is exclusively in order to support Python 3.7.

Version 0.19.1

October 23, 2017

This is a bug-fix release with some minor documentation improvements and enhancements to features released in 0.19.0.

Note there may be minor differences in TSNE output in this release (due to #9623), in the case where multiple samples have equal distance to some sample.

Changelog

API changes

  • Reverted the addition of metrics.ndcg_score and metrics.dcg_score which had been merged into version 0.19.0 by error. The implementations were broken and undocumented.
  • return_train_score which was added to model_selection.GridSearchCV, model_selection.RandomizedSearchCV and model_selection.cross_validate in version 0.19.0 will be changing its default value from True to False in version 0.21. We found that calculating training score could have a great effect on cross validation runtime in some cases. Users should explicitly set return_train_score to False if prediction or scoring functions are slow, resulting in a deleterious effect on CV runtime, or to True if they wish to use the calculated scores. #9677 by Kumar Ashutosh and Joel Nothman.
  • correlation_models and regression_models from the legacy gaussian processes implementation have been belatedly deprecated. #9717 by Kumar Ashutosh.

Bug fixes

Regressions in 0.19.0 fixed in 0.19.1:

Enhancements

Code and Documentation Contributors

With thanks to:

Joel Nothman, Loic Esteve, Andreas Mueller, Kumar Ashutosh, Vrishank Bhardwaj, Hanmin Qin, Rasul Kerimov, James Bourbeau, Nagarjuna Kumar, Nathaniel Saul, Olivier Grisel, Roman Yurchak, Reiichiro Nakano, Sachin Kelkar, Sam Steingold, Yaroslav Halchenko, diegodlh, felix, goncalo-rodrigues, jkleint, oliblum90, pasbi, Anthony Gitter, Ben Lawson, Charlie Brummitt, Didi Bar-Zev, Gael Varoquaux, Joan Massich, Joris Van den Bossche, nielsenmarkus11

Version 0.19

August 12, 2017

Highlights

We are excited to release a number of great new features including neighbors.LocalOutlierFactor for anomaly detection, preprocessing.QuantileTransformer for robust feature transformation, and the multioutput.ClassifierChain meta-estimator to simply account for dependencies between classes in multilabel problems. We have some new algorithms in existing estimators, such as multiplicative update in decomposition.NMF and multinomial linear_model.LogisticRegression with L1 loss (use solver='saga').

Cross validation is now able to return the results from multiple metric evaluations. The new model_selection.cross_validate can return many scores on the test data as well as training set performance and timings, and we have extended the scoring and refit parameters for grid/randomized search to handle multiple metrics.

You can also learn faster. For instance, the new option to cache transformations in pipeline.Pipeline makes grid search over pipelines including slow transformations much more efficient. And you can predict faster: if you’re sure you know what you’re doing, you can turn off validating that the input is finite using config_context.

We’ve made some important fixes too. We’ve fixed a longstanding implementation error in metrics.average_precision_score, so please be cautious with prior results reported from that function. A number of errors in the manifold.TSNE implementation have been fixed, particularly in the default Barnes-Hut approximation. semi_supervised.LabelSpreading and semi_supervised.LabelPropagation have had substantial fixes. LabelPropagation was previously broken. LabelSpreading should now correctly respect its alpha parameter.

Changed models

The following estimators and functions, when fit with the same data and parameters, may produce different models from the previous version. This often occurs due to changes in the modelling logic (bug fixes or enhancements), or in random sampling procedures.

Details are listed in the changelog below.

(While we are trying to better inform users by providing this information, we cannot assure that this list is complete.)

Changelog

New features

Classifiers and regressors

Other estimators

Model selection and evaluation

Miscellaneous

  • Validation that input data contains no NaN or inf can now be suppressed using config_context, at your own risk. This will save on runtime, and may be particularly useful for prediction time. #7548 by Joel Nothman.
  • Added a test to ensure parameter listing in docstrings match the function/class signature. #9206 by Alexandre Gramfort and Raghav RV.

Enhancements

Trees and ensembles

Linear, kernelized and related models

Other predictors

  • Custom metrics for the neighbors binary trees now have fewer constraints: they must take two 1d-arrays and return a float. #6288 by Jake Vanderplas.
  • algorithm='auto in neighbors estimators now chooses the most appropriate algorithm for all input types and metrics. #9145 by Herilalaina Rakotoarison and Reddy Chinthala.

Decomposition, manifold learning and clustering

Preprocessing and feature selection

Model evaluation and meta-estimators

Metrics

Miscellaneous

Bug fixes

Trees and ensembles

Linear, kernelized and related models

Other predictors

Decomposition, manifold learning and clustering

Preprocessing and feature selection

Model evaluation and meta-estimators

Metrics

Miscellaneous

API changes summary

Trees and ensembles

  • Gradient boosting base models are no longer estimators. By Andreas Müller.
  • All tree based estimators now accept a min_impurity_decrease parameter in lieu of the min_impurity_split, which is now deprecated. The min_impurity_decrease helps stop splitting the nodes in which the weighted impurity decrease from splitting is no longer at least min_impurity_decrease. #8449 by Raghav RV.

Linear, kernelized and related models

Other predictors

Decomposition, manifold learning and clustering

Preprocessing and feature selection

Model evaluation and meta-estimators

Miscellaneous

  • Deprecate the y parameter in transform and inverse_transform. The method should not accept y parameter, as it’s used at the prediction time. #8174 by Tahar Zanouda, Alexandre Gramfort and Raghav RV.

  • SciPy >= 0.13.3 and NumPy >= 1.8.2 are now the minimum supported versions for scikit-learn. The following backported functions in utils have been removed or deprecated accordingly. #8854 and #8874 by Naoya Kanai

  • The store_covariances and covariances_ parameters of discriminant_analysis.QuadraticDiscriminantAnalysis has been renamed to store_covariance and covariance_ to be consistent with the corresponding parameter names of the discriminant_analysis.LinearDiscriminantAnalysis. They will be removed in version 0.21. #7998 by Jiacheng

    Removed in 0.19:

    • utils.fixes.argpartition
    • utils.fixes.array_equal
    • utils.fixes.astype
    • utils.fixes.bincount
    • utils.fixes.expit
    • utils.fixes.frombuffer_empty
    • utils.fixes.in1d
    • utils.fixes.norm
    • utils.fixes.rankdata
    • utils.fixes.safe_copy

    Deprecated in 0.19, to be removed in 0.21:

    • utils.arpack.eigs
    • utils.arpack.eigsh
    • utils.arpack.svds
    • utils.extmath.fast_dot
    • utils.extmath.logsumexp
    • utils.extmath.norm
    • utils.extmath.pinvh
    • utils.graph.graph_laplacian
    • utils.random.choice
    • utils.sparsetools.connected_components
    • utils.stats.rankdata
  • Estimators with both methods decision_function and predict_proba are now required to have a monotonic relation between them. The method check_decision_proba_consistency has been added in utils.estimator_checks to check their consistency. #7578 by Shubham Bhardwaj

  • All checks in utils.estimator_checks, in particular utils.estimator_checks.check_estimator now accept estimator instances. Most other checks do not accept estimator classes any more. #9019 by Andreas Müller.

  • Ensure that estimators’ attributes ending with _ are not set in the constructor but only in the fit method. Most notably, ensemble estimators (deriving from ensemble.BaseEnsemble) now only have self.estimators_ available after fit. #7464 by Lars Buitinck and Loic Esteve.

Code and Documentation Contributors

Thanks to everyone who has contributed to the maintenance and improvement of the project since version 0.18, including:

Joel Nothman, Loic Esteve, Andreas Mueller, Guillaume Lemaitre, Olivier Grisel, Hanmin Qin, Raghav RV, Alexandre Gramfort, themrmax, Aman Dalmia, Gael Varoquaux, Naoya Kanai, Tom Dupré la Tour, Rishikesh, Nelson Liu, Taehoon Lee, Nelle Varoquaux, Aashil, Mikhail Korobov, Sebastin Santy, Joan Massich, Roman Yurchak, RAKOTOARISON Herilalaina, Thierry Guillemot, Alexandre Abadie, Carol Willing, Balakumaran Manoharan, Josh Karnofsky, Vlad Niculae, Utkarsh Upadhyay, Dmitry Petrov, Minghui Liu, Srivatsan, Vincent Pham, Albert Thomas, Jake VanderPlas, Attractadore, JC Liu, alexandercbooth, chkoar, Óscar Nájera, Aarshay Jain, Kyle Gilliam, Ramana Subramanyam, CJ Carey, Clement Joudet, David Robles, He Chen, Joris Van den Bossche, Karan Desai, Katie Luangkote, Leland McInnes, Maniteja Nandana, Michele Lacchia, Sergei Lebedev, Shubham Bhardwaj, akshay0724, omtcyfz, rickiepark, waterponey, Vathsala Achar, jbDelafosse, Ralf Gommers, Ekaterina Krivich, Vivek Kumar, Ishank Gulati, Dave Elliott, ldirer, Reiichiro Nakano, Levi John Wolf, Mathieu Blondel, Sid Kapur, Dougal J. Sutherland, midinas, mikebenfield, Sourav Singh, Aseem Bansal, Ibraim Ganiev, Stephen Hoover, AishwaryaRK, Steven C. Howell, Gary Foreman, Neeraj Gangwar, Tahar, Jon Crall, dokato, Kathy Chen, ferria, Thomas Moreau, Charlie Brummitt, Nicolas Goix, Adam Kleczewski, Sam Shleifer, Nikita Singh, Basil Beirouti, Giorgio Patrini, Manoj Kumar, Rafael Possas, James Bourbeau, James A. Bednar, Janine Harper, Jaye, Jean Helie, Jeremy Steward, Artsiom, John Wei, Jonathan LIgo, Jonathan Rahn, seanpwilliams, Arthur Mensch, Josh Levy, Julian Kuhlmann, Julien Aubert, Jörn Hees, Kai, shivamgargsya, Kat Hempstalk, Kaushik Lakshmikanth, Kennedy, Kenneth Lyons, Kenneth Myers, Kevin Yap, Kirill Bobyrev, Konstantin Podshumok, Arthur Imbert, Lee Murray, toastedcornflakes, Lera, Li Li, Arthur Douillard, Mainak Jas, tobycheese, Manraj Singh, Manvendra Singh, Marc Meketon, MarcoFalke, Matthew Brett, Matthias Gilch, Mehul Ahuja, Melanie Goetz, Meng, Peng, Michael Dezube, Michal Baumgartner, vibrantabhi19, Artem Golubin, Milen Paskov, Antonin Carette, Morikko, MrMjauh, NALEPA Emmanuel, Namiya, Antoine Wendlinger, Narine Kokhlikyan, NarineK, Nate Guerin, Angus Williams, Ang Lu, Nicole Vavrova, Nitish Pandey, Okhlopkov Daniil Olegovich, Andy Craze, Om Prakash, Parminder Singh, Patrick Carlson, Patrick Pei, Paul Ganssle, Paulo Haddad, Paweł Lorek, Peng Yu, Pete Bachant, Peter Bull, Peter Csizsek, Peter Wang, Pieter Arthur de Jong, Ping-Yao, Chang, Preston Parry, Puneet Mathur, Quentin Hibon, Andrew Smith, Andrew Jackson, 1kastner, Rameshwar Bhaskaran, Rebecca Bilbro, Remi Rampin, Andrea Esuli, Rob Hall, Robert Bradshaw, Romain Brault, Aman Pratik, Ruifeng Zheng, Russell Smith, Sachin Agarwal, Sailesh Choyal, Samson Tan, Samuël Weber, Sarah Brown, Sebastian Pölsterl, Sebastian Raschka, Sebastian Saeger, Alyssa Batula, Abhyuday Pratap Singh, Sergey Feldman, Sergul Aydore, Sharan Yalburgi, willduan, Siddharth Gupta, Sri Krishna, Almer, Stijn Tonk, Allen Riddell, Theofilos Papapanagiotou, Alison, Alexis Mignon, Tommy Boucher, Tommy Löfstedt, Toshihiro Kamishima, Tyler Folkman, Tyler Lanigan, Alexander Junge, Varun Shenoy, Victor Poughon, Vilhelm von Ehrenheim, Aleksandr Sandrovskii, Alan Yee, Vlasios Vasileiou, Warut Vijitbenjaronk, Yang Zhang, Yaroslav Halchenko, Yichuan Liu, Yuichi Fujikawa, affanv14, aivision2020, xor, andreh7, brady salz, campustrampus, Agamemnon Krasoulis, ditenberg, elena-sharova, filipj8, fukatani, gedeck, guiniol, guoci, hakaa1, hongkahjun, i-am-xhy, jakirkham, jaroslaw-weber, jayzed82, jeroko, jmontoyam, jonathan.striebel, josephsalmon, jschendel, leereeves, martin-hahn, mathurinm, mehak-sachdeva, mlewis1729, mlliou112, mthorrell, ndingwall, nuffe, yangarbiter, plagree, pldtc325, Breno Freitas, Brett Olsen, Brian A. Alfano, Brian Burns, polmauri, Brandon Carter, Charlton Austin, Chayant T15h, Chinmaya Pancholi, Christian Danielsen, Chung Yen, Chyi-Kwei Yau, pravarmahajan, DOHMATOB Elvis, Daniel LeJeune, Daniel Hnyk, Darius Morawiec, David DeTomaso, David Gasquez, David Haberthür, David Heryanto, David Kirkby, David Nicholson, rashchedrin, Deborah Gertrude Digges, Denis Engemann, Devansh D, Dickson, Bob Baxley, Don86, E. Lynch-Klarup, Ed Rogers, Elizabeth Ferriss, Ellen-Co2, Fabian Egli, Fang-Chieh Chou, Bing Tian Dai, Greg Stupp, Grzegorz Szpak, Bertrand Thirion, Hadrien Bertrand, Harizo Rajaona, zxcvbnius, Henry Lin, Holger Peters, Icyblade Dai, Igor Andriushchenko, Ilya, Isaac Laughlin, Iván Vallés, Aurélien Bellet, JPFrancoia, Jacob Schreiber, Asish Mahapatra