Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
233 commits
Select commit Hold shift + click to select a range
719fcf3
FEA add LearningCurveDisplay
glemaitre Aug 2, 2022
cc9bf3e
DOC prepare placeholder for doc
glemaitre Aug 2, 2022
a1912b1
update whats new
glemaitre Aug 2, 2022
223082f
wip doc
glemaitre Aug 2, 2022
d5ed765
DOC update API docstrings
glemaitre Aug 2, 2022
3a4c7d9
reformat first example
glemaitre Aug 2, 2022
a269f7f
DOC refactor example
glemaitre Aug 3, 2022
9488d0e
DOC add more information about the display in the user guide
glemaitre Aug 3, 2022
500b231
fix
glemaitre Aug 4, 2022
62a97df
MAINT Do not version *.pyc* via .gitignore (#24081)
jjerphan Aug 2, 2022
3daffdd
FIX Convergence Warnings in Gaussian process examples (#18019)
marenwestermann Aug 2, 2022
0ced5ca
DOC Ensures that mutual_info_score passes numpydoc validation (#24091)
Vincent-Maladiere Aug 3, 2022
2767396
DOC Ensures that normalized_mutual_info_score passes numpydoc validat…
Vincent-Maladiere Aug 3, 2022
b56b366
DOC spectral biclustering: corrected contradiction of warning and doc…
Maascha Aug 3, 2022
544cb6c
DOC Ensures that `pair_confusion_matrix` passes numpydoc validation (…
Vincent-Maladiere Aug 3, 2022
e8e4668
FIX utils.multiclass.type_of_target with numpy 1.24 dev (#24044)
lesteve Aug 4, 2022
57c9046
DOC Ensures `v_measure_score` passes numpydoc validation (#24097)
Vincent-Maladiere Aug 4, 2022
91b0bef
TST use global_random_seed in sklearn/cluster/tests/test_bicluster.py…
marenwestermann Aug 5, 2022
ecd95cc
MAINT fix the way to call stats.mode (#23633)
glemaitre Aug 5, 2022
09f9f22
CI Set MACOSX_DEPLOYMENT_TARGET=10.9 (#23833)
thomasjpfan Aug 5, 2022
4122f0a
FIX Fixes OrdinalEncoder.inverse_tranform nan encoded values (#24087)
thomasjpfan Aug 5, 2022
3bf869c
move some issues from 1.2 to 1.1
glemaitre Aug 5, 2022
82f23e1
DOC add date for release 1.1.2
glemaitre Aug 5, 2022
9380cf1
Fix Taylor expansion documentation (#24122)
ravimakhijapi Aug 5, 2022
f7ddb6b
DOC Updates linear_model.Perceptron regarding t_ (#24073)
ShehanAT Aug 5, 2022
b831a21
DOC Remove deprecated multichannel parameter in example (#24116)
thomasjpfan Aug 5, 2022
45d6384
MAINT Minor refactor to de-indent majority of `_assert_all_finite` (#…
Micky774 Aug 5, 2022
ed05c40
DOC Update MDS init docs in fit (#24070)
thomasjpfan Aug 5, 2022
2ad30df
MNT Use is_sparse to validate sparse data from pandas (#24074)
thomasjpfan Aug 5, 2022
e33fd6d
DOC Fix variable name in Adaboost example (#24135)
ravimakhijapi Aug 7, 2022
5bfd971
FIX Set n_jobs=None as default for neighbors transformers (#24075)
Valentin-Laurent Aug 8, 2022
13c9e89
DOC Update `validate_parameter_constraints()` docstring. (#24130)
stefmolin Aug 8, 2022
5ee88ad
DOC Fixes search on webpage (#24128)
thomasjpfan Aug 9, 2022
c3b3df8
DOC Ensures that `rand_score` passes numpydoc validation (#24096)
Vincent-Maladiere Aug 9, 2022
2248fb7
DOC Ensures that fetch_species_distributions passes numpydoc validati…
fcharras Aug 10, 2022
7e5d078
DOC Ensures that fetch_lfw_people passes numpydoc validation (#24161)
fcharras Aug 10, 2022
6916d6a
FEA Add support for float32 on `PairwiseDistancesReduction` using Tem…
jjerphan Aug 10, 2022
d6b80c5
DOC Ensures that load_svmlight_files passes numpydoc validation (#24164)
fcharras Aug 10, 2022
5951fe3
DOC Updated `adjusted_rand_score` docstring (#24019)
Micky774 Aug 10, 2022
d8e6b6c
TST Set eigen_tol in SpectralEmbedding to stabilize test (#24125)
thomasjpfan Aug 11, 2022
cf1e1c3
ENH Adds text_kw to ConfusionMatrix (#24051)
thomasjpfan Aug 11, 2022
648f3cf
TST Fix `test_pairwise_distances_argkmin` xfail (#24168)
jjerphan Aug 11, 2022
53f4a88
MAINT Adapt `PairwiseDistancesReduction` heuristic for `strategy="aut…
jjerphan Aug 11, 2022
dfa3959
Moved location of legend (#24166)
star1327p Aug 12, 2022
01bc430
FIX Update python version in Binder environment (#24088)
MaxwellLZH Aug 12, 2022
5eb80e6
MNT Fix binder setup (#24173)
lesteve Aug 12, 2022
8788473
DOC Ensures that load_svmlight_file passes numpydoc validation (#24163)
fcharras Aug 12, 2022
79a4587
DOC Ensures that partial_dependence passes numpydoc validation (#24174)
ak04p Aug 13, 2022
40117dd
DOC Ensures that mean_variance_axis passes numpydoc validation (#24177)
symeneses Aug 13, 2022
3a93568
FIX adaboost return nan in feature importance (#20415)
MaxwellLZH Aug 15, 2022
73a2829
MNT Handle NaNs in scipy dev rankdata (#24141)
lesteve Aug 16, 2022
f5be6b6
DOC Fix docstrings and comments for `PairwiseDistancesReduction` (#23…
jjerphan Aug 16, 2022
6566f0b
DOC Ensures that inplace_swap_row passes numpydoc validation (#24178)
ak04p Aug 16, 2022
7714e27
DOC Correct a typo: this -> these (#24192)
star1327p Aug 17, 2022
00f6aa3
DOC add missing docstring in functions in hgbt module (#24191)
lorentzenchr Aug 17, 2022
c82689a
DOC Fix typo brier_score_loss doctring: is the sum -> as the sum (#24…
fabridamicelli Aug 18, 2022
cb0d9aa
CI Remove pandas FutureWarning in scipy-dev build (#24206)
lesteve Aug 19, 2022
8654be6
CI Use Ubuntu 22.04 instead of Ubuntu 18.04 (#24225)
jjerphan Aug 22, 2022
fdba1a3
MAINT Fix section ordering and duplicate sections (#24226)
stefmolin Aug 22, 2022
8925933
CI add ability to run float32 tests by commit message (#24202)
lesteve Aug 23, 2022
6558e24
DOC Expand multilabel in decision function in glossary (#24095)
lucyleeow Aug 24, 2022
a862294
DOC Add section to contributing.rst on cross referencing syntax (#24092)
lucyleeow Aug 24, 2022
4e3f390
MAINT add parameters validation for ShrunkCovariance (#24108)
Vincent-Maladiere Aug 24, 2022
a8541a0
DOC Added links and corrected typos to plot_stock_market.py (#24209)
star1327p Aug 24, 2022
722bcab
DOC Clarify LeaveOneGroupOut (#24159)
lucyleeow Aug 24, 2022
ec3f13d
DOC Ensures that strip_accents_unicode passes numpydoc (#24232)
CloseChoice Aug 24, 2022
1571061
DOC Ensures that non_negative_factorization passes numpydoc (#24235)
CloseChoice Aug 24, 2022
27f49a8
DOC Correct typos in plot_species_distribution_modeling (#24256)
star1327p Aug 24, 2022
295aa14
DOC Remove additional semicolon in HTML for Parameters and others sec…
lesteve Aug 25, 2022
5bcbfbb
MAINT Parameters validation for `SkewedChi2Sampler` (#24114)
Vincent-Maladiere Aug 25, 2022
f554b46
DOC Add Maxwell Liu to the Contributor Experience Team (#24260)
jjerphan Aug 25, 2022
102fd15
[float32] Fix fastica tests for debian 32 bit build and global dtype …
lesteve Aug 25, 2022
e038fbd
MAINT Adapt `DistanceMetric` in prevision for fused sparse-dense supp…
jjerphan Aug 25, 2022
3e4f829
MAINT Parameter validation for `QuadraticDiscriminantAnalysis` (#24218)
stefmolin Aug 25, 2022
964a57a
DOC Correct typo in SelectFromModel (#24266)
vitaliset Aug 26, 2022
8ff8dd6
DOC Ensures that top_k_accuracy_score passes numpydoc (#24259)
vitaliset Aug 26, 2022
b834000
CI simplify passing of environment variables in Azure docker template…
lesteve Aug 26, 2022
6b47bc6
MAINT Update the name scheme of the `PairwiseDistancesReduction` back…
Micky774 Aug 26, 2022
7219630
MAINT add parameters validation for SplineTransformer (#24057)
kasmith11 Aug 26, 2022
e2a55c9
CI Update to macOS-11 in Azure CI (#24267)
thomasjpfan Aug 29, 2022
62235e0
CI Update to MacOS-11 in azure build for MacOS-10.15 is deprecated. (…
cmarmo Aug 29, 2022
9a520d0
DOC Fix minor typo in clustering user guide (#24284)
NimaSarajpoor Aug 29, 2022
4805a6b
MAINT Parameter validation for `TransformedTargetRegressor` (#24219)
stefmolin Aug 29, 2022
9442dab
MAINT Add parameter validation to `PolynomialFeatures` (#24214)
stefmolin Aug 29, 2022
b931e38
MAINT Add parameter validation to SequentialFeatureSelector. (#24129)
stefmolin Aug 29, 2022
81aee4f
DOC Ensure dict_learning_online passes numpydoc validation (#24289)
IvanLauLinTiong Aug 29, 2022
68cd302
DOC added description for DBSCAN (#24278)
star1327p Aug 29, 2022
068a6aa
DOC Fix some typos (#24300)
yuanx749 Aug 29, 2022
abca6f1
CI Fixes junit in CI based on docker (#24299)
thomasjpfan Aug 29, 2022
3105e23
MAINT Add parameter validation to RFE and RFECV. (#24137)
stefmolin Aug 29, 2022
fe4fa12
MNT Adds dict typing hint to _parameter_constraints for mypy (#24301)
thomasjpfan Aug 30, 2022
cc2ad37
MAINT _validate_params in BayesianRidge (#24047)
mehmetcanakbay Aug 30, 2022
0e1847f
MAINT Parameter validation for LedoitWolf (#24132)
shellyfung Aug 30, 2022
e0b5f8d
MAINT Parameters validation for `SimpleImputer` (#24109)
Vincent-Maladiere Aug 30, 2022
2d31d16
DOC Rework plot_adjusted_for_chance_measures.py example (#23708)
ArturoAmorQ Aug 30, 2022
4513744
MAINT Parameter Validation for Lars, LarsCV, LassoLars, LassoLarsCV a…
rprkh Aug 30, 2022
192454f
ENH Param validation: Introduce Options constraint (#24048)
jeremiedbb Aug 30, 2022
3ef9131
MAINT Add parameter validation for classes in _univariate_selection.p…
stefmolin Aug 30, 2022
91c049f
MAINT Parameters validation for AdditiveChi2Sampler (#24149)
amitalokbera Aug 30, 2022
4c5fb26
MAINT Add parameter validation to `FeatureHasher` (#24179)
stefmolin Aug 30, 2022
8fd8cc7
Add scikit-network to related projects (#24304)
tbonald Aug 30, 2022
9c2ecd0
MAINT Add parameter validation for `FunctionTransformer`. (#24180)
stefmolin Aug 30, 2022
44ac14c
MAINT Parameter validation for `PolynomialCountSketch` (#24217)
stefmolin Aug 31, 2022
6d5528f
MAINT Parameter validation for `RBFSampler` (#24220)
stefmolin Aug 31, 2022
6a11921
MAINT Parameter validation for Isomap (#24183)
shellyfung Aug 31, 2022
f4e824e
MAINT Add parameter validation for `LabelPropagation` and `LabelSprea…
stefmolin Aug 31, 2022
9f53ec0
MAINT Add parameter validation to `IterativeImputer` (#24210)
stefmolin Aug 31, 2022
eb826f7
MAINT Parameters validation for `CalibratedClassifierCV` (#24101)
Olle-Lukowski Aug 31, 2022
a483a58
MAINT Add parameter validation to `LatentDirichletAllocation` (#24212)
stefmolin Aug 31, 2022
b92f8cd
MAINT Parameters validation for `SpectralEmbedding` (#24103)
kasmith11 Aug 31, 2022
1403095
MAINT Parameters validation for `ClassifierChain` and `RegressorChain…
Olle-Lukowski Aug 31, 2022
81d3337
DOC Updating Branding Guidelines (#24241)
laurburke Aug 31, 2022
8307d1e
MAINT Parameter validation for SpectralBiclustering and SpectralCoclu…
stellalin7 Aug 31, 2022
09d0576
DOC improved readability of instructions (#24311)
star1327p Sep 1, 2022
a692e10
MAINT Param validation: remove n_estimators checks from validate_esti…
naoise-h Sep 1, 2022
4a1554a
MAINT Parameters validation for NeighborhoodComponentsAnalysis (#24195)
EdAbati Sep 1, 2022
6a98596
MAINT Add parameter validation to `HashingVectorizer`. (#24181)
stefmolin Sep 1, 2022
ea2ca88
MAINT Add parameter validation to `SelectFromModel` (#24213)
stefmolin Sep 2, 2022
cd36b91
MAINT Parameter validation for `PatchExtractor` (#24215)
stefmolin Sep 2, 2022
450b9d5
MAINT Parameters validation for MultiTaskElasticNet and MultiTaskLass…
OmarManzoor Sep 2, 2022
f2d4512
MNT add dtype preservation tag to BernoulliRBM (#24318)
svenstehle Sep 2, 2022
664f1ed
MAINT lars_path_gram passes numpydoc validation (#24319)
pmli Sep 2, 2022
51b6513
MAINT Parameters validation for RidgeCV and RidgeClassifierCV (#24184)
Mehgarg Sep 2, 2022
49be747
MAINT Parameters validation for OneVsOneClassifier (#24292)
OmarManzoor Sep 2, 2022
4a3dcb5
MAINT Validate params in OAS (#24324)
MisaOgura Sep 2, 2022
38d22d1
MAINT Parameters validation for DictionaryLearning (#24242)
ShisuiUzumaki Sep 2, 2022
b9492e8
MAINT coverage_error passes numpydoc validation (#24322)
hristo-vrigazov Sep 2, 2022
0f531de
DOC Rework `plot_kmeans_stability_low_dim_dense.py` to make it more c…
betatim Sep 2, 2022
b402b4a
FIX Allow for KMean's attributes to be readonly (#24258)
thomasjpfan Sep 2, 2022
1ac01a3
MAINT Parameters validation for OneVsRest estimator (#24290)
nitinramvelraj Sep 2, 2022
4c917e7
DOC Ensure sklearn.linear_model._omp.orthogonal_mp_gram passes numpyd…
maikia Sep 2, 2022
533f1cb
DOC Ensure manifold._locally_linear.locally_linear_embedding passes n…
maikia Sep 2, 2022
5e42f1b
DOC Ensure manifold._t_sne.trustworthiness passes numpydoc validation…
maikia Sep 2, 2022
853a370
MAINT Parameters validation for Nystroem (#24332)
mrastgoo Sep 2, 2022
ca3e276
MAINT Parameters validation for MiniBatchDictionaryLearning (#24271)
OmarManzoor Sep 2, 2022
d1b1d10
DOC Ensures that mean_pinball_loss passes numpydoc validation (#24336)
ichko Sep 2, 2022
76f4048
MAINT Parameters validation for RANSACRegressor (#24339)
mikeonly Sep 2, 2022
a6af30a
MAINT Parameters validation for OPTICS (#24326)
OmarManzoor Sep 2, 2022
3bc9016
DOC moved legend to the right (#24342)
star1327p Sep 3, 2022
fede029
DOC Ensures that adjusted_rand_score passes numpydoc validation (#24345)
Safikh Sep 3, 2022
e5d5b9f
DOC Ensures that consensus_score passes numpydoc validation (#24343)
Safikh Sep 3, 2022
08b1117
DOC Ensure plot_det_curve passes numpydoc validation (#24334)
maikia Sep 3, 2022
1f20c57
DOC Ensure plot_partial_dependence passes numpydoc validation (#24325)
maikia Sep 3, 2022
16f86a2
DOC Ensure dict_learning passes numpydoc validation (#24316)
maikia Sep 3, 2022
7a897d1
DOC Ensure externals._packaging.version.parse passes numpydoc validat…
maikia Sep 4, 2022
b5de9a0
DOC Ensures that adjusted_mutual_info_score passes numpydoc validatio…
Safikh Sep 4, 2022
2283542
DOC ensure sklearn/utils/extmath/stable_cumsum passes numpydoc (#24348)
TheDevPanda Sep 4, 2022
f69a02a
MAINT Use the newest NumPy C API where possible (#24049)
jjerphan Sep 5, 2022
669835c
MAINT clean-up unused variables and imports in cython files (#24347)
MarcoGorelli Sep 5, 2022
7a00114
DOC Ensures that `scale` passes numpydoc validation (#24362)
OmarManzoor Sep 5, 2022
8a0ec78
DOC Ensures that `squared_norm` passes numpydoc validation (#24360)
OmarManzoor Sep 5, 2022
3e5d5bc
DOC Ensures that `maxabs_scale` passes numpydoc validation (#24359)
OmarManzoor Sep 5, 2022
32ed731
DOC fix a typo in `build_analyzer` docstring (#24309)
3lLobo Sep 5, 2022
984930d
DOC Ensures that sklearn.metrics._ranking passes numpydoc validation …
shellyfung Sep 5, 2022
21fabd7
DOC Ensures that cluster._supervised passes numpydoc validation (#24352)
shellyfung Sep 5, 2022
a493eb5
MAINT abstracmethod in `_gb_losses` (#24277)
gittasche Sep 5, 2022
b3cc549
FIX np.divide undefined behaviour with where in gaussian processes (#…
lesteve Sep 5, 2022
50ee3fa
MAINT update lock files on CI (#24363)
ogrisel Sep 5, 2022
b149b0e
FIX Enables label_ranking_average_precision_score to support sparse y…
ShehanAT Sep 5, 2022
be08149
DOC revised description for Pipeline ANOVA SVM (#24358)
star1327p Sep 5, 2022
d4d90d2
MAINT Remove `x_squared_norms` arg from `k_means_lloyd` signature (#2…
Vincent-Maladiere Sep 5, 2022
c3a6729
amend wording doc ci (#24370)
lucyleeow Sep 6, 2022
2831e7c
rm custom_references_resolver (#24366)
lucyleeow Sep 6, 2022
f8d82f6
DOC Fix grammar in HashingVectorizer's docstring (#24372)
biswaroopmitra Sep 6, 2022
babf776
CI Pin numpy for conda defaults channel (#24373)
lesteve Sep 6, 2022
fb7b90b
CI Update nogil lock files (#24377)
lesteve Sep 6, 2022
89c4a75
DOC Ensures that l1_min_c passes numpydoc validation (#24134)
kshitijkapadni Sep 6, 2022
46fa620
MNT Update doc and param validation for SequentialFeatureSelector abo…
thomasjpfan Sep 6, 2022
daf4317
CI Cancel in progress wheel builds (#24375)
thomasjpfan Sep 7, 2022
17b55e6
DOC ensures sklearn.utils.shuffle passes numpydoc validation (#24367)
zadilkhwaja Sep 7, 2022
7580e0f
FIX remove np.divide with where and without out argument in `precisio…
lesteve Sep 7, 2022
98a48a0
CI: pin pypy to avoid cloudpickle issue (#24376)
lesteve Sep 7, 2022
d5f03a8
TST Remove remaining tests now covered by common param validation te…
jeremiedbb Sep 7, 2022
ef8240d
MAINT Clean deprecation for 1.2: criterion="mse"/"mae" in trees (#24…
jeremiedbb Sep 7, 2022
4a664e8
DOC Expand types of docs in contributing docs section (#24371)
lucyleeow Sep 7, 2022
b2f4a2f
cln deprecations (#24385)
jeremiedbb Sep 7, 2022
743a4c2
cln deprecations (#24386)
jeremiedbb Sep 7, 2022
bcef5da
DOC: Streamline usage of Gaussian Process reference book (#24331)
elcorto Sep 7, 2022
8eafa28
DOC Add note on backtick rendering (#24368)
lucyleeow Sep 8, 2022
e5e4c9b
DOC moved legend to center (#24379)
star1327p Sep 8, 2022
74086c0
MAINT Clean deprecation for 1.2: n_features_ replaced by n_featues_in…
jeremiedbb Sep 8, 2022
0783585
MAINT Pop `Y_norm_squared` from `metric_kwargs` when needed (#24272)
jjerphan Sep 8, 2022
394ab48
CI Race condition work around for doc-min-dependencies (#24400)
thomasjpfan Sep 9, 2022
881ef3b
DOC Use pipeline in classifiers example (#24399)
betatim Sep 9, 2022
2cf7986
MAINT Clean deprecation for 1.2: BIRCH attributes (#24398)
jeremiedbb Sep 9, 2022
8fb0565
MAINT Clean deprecation for 1.2: learning_rate and init in TSNE (#24389)
glemaitre Sep 9, 2022
fbcb2fe
MAINT rename and deprecate `base_estimator` in favor of `estimator` i…
EdAbati Sep 9, 2022
21cda38
ENH Add dtype preservation to SkewedChi2Sampler (#24350)
rprkh Sep 9, 2022
a04ea0a
MAINT black compliant
glemaitre Sep 9, 2022
2ea588a
DOC Ensures plot_precision_recall_curve passes the numpydoc validatio…
Kshitij68 Sep 9, 2022
9db4944
ENH Preserves dtype in `RBFSampler` (#24317)
betatim Sep 9, 2022
2d8f48c
MAINT Fix some broken asv benchmarks (#24407)
jeremiedbb Sep 9, 2022
c87e31a
ENH Always set input feature attributes in FunctionTransformer (#23993)
thomasjpfan Sep 9, 2022
942cd34
TST refactor test for contamination param for outlier detectors (#23738)
glemaitre Sep 9, 2022
cdd14f5
DOC Clarify when GroupKFold same as LeaveOneGroupOut (#24104)
lucyleeow Sep 10, 2022
b5059e3
DOC remove Matplotlib warning in plot_varimax_fa example (#24397)
x110 Sep 10, 2022
78e94af
DOC RandomizedSearchCV verbosity parameter description (#24413)
rprkh Sep 10, 2022
61d8294
DOC ensures sklearn.utils.safe_mask passes numpydoc validation (#24425)
zadilkhwaja Sep 12, 2022
a32ea51
MNT Update license year to 2022 (#24418)
christianwaldmann Sep 12, 2022
9544490
DOC improve and correct typo in docstring (#24417)
biswaroopmitra Sep 12, 2022
1e8ca61
DOC fix some typos in docstring (#24416)
rhelmeczi Sep 12, 2022
384c887
MAINT Clean deprecation for 1.2: Ransac losses (#24408)
jeremiedbb Sep 12, 2022
40d5d51
MAINT Clean deprecation for 1.2: KernelPCA (#24406)
jeremiedbb Sep 12, 2022
d2e2d35
FIX Ensure that GaussianProcessRegressor predict method does not modi…
OmarManzoor Sep 12, 2022
4d298b3
Merge remote-tracking branch 'origin/main' into learning_curve_display
glemaitre Sep 12, 2022
311136f
iter
glemaitre Sep 12, 2022
0f7cc35
iter
glemaitre Sep 12, 2022
b3c4d15
iter
glemaitre Sep 13, 2022
7dbf1a7
iter
glemaitre Sep 13, 2022
a66a859
iter
glemaitre Sep 13, 2022
a1dd0be
fix
glemaitre Sep 13, 2022
3910f7e
Merge remote-tracking branch 'origin/main' into learning_curve_display
glemaitre Sep 16, 2022
e2083b3
more tests
glemaitre Sep 16, 2022
98c7830
Merge remote-tracking branch 'origin/main' into learning_curve_display
glemaitre Sep 29, 2022
e39b0cd
TST more tests
glemaitre Sep 29, 2022
c613d93
TST check both lines and errorbar
glemaitre Sep 29, 2022
eb64b3c
TST check the behaviour of log_scale
glemaitre Sep 29, 2022
f99ed38
TST check behaviour of std_display_style
glemaitre Sep 29, 2022
69541a2
TST check behaviour of plotting kwargs
glemaitre Sep 29, 2022
eb6a41d
DOC remove typo
glemaitre Sep 29, 2022
5f2468e
Apply suggestions from code review
glemaitre Nov 4, 2022
6fa19de
Merge remote-tracking branch 'origin/main' into learning_curve_display
glemaitre Nov 15, 2022
d5f42b2
doc comments
glemaitre Nov 15, 2022
325c3b6
iter
glemaitre Nov 15, 2022
cd05a53
iter
glemaitre Nov 15, 2022
78f0fc1
iter
glemaitre Nov 16, 2022
48acf7c
Apply suggestions from code review
glemaitre Nov 16, 2022
ca5c31e
DOC update changelog
glemaitre Nov 16, 2022
6166a8d
iter
glemaitre Nov 16, 2022
f96a792
Apply suggestions from code review
glemaitre Nov 23, 2022
312cefc
Update sklearn/model_selection/_plot.py
glemaitre Nov 23, 2022
8fc8127
iter
glemaitre Nov 23, 2022
1897803
iter
glemaitre Nov 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/modules/classes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,17 @@ Model validation
model_selection.permutation_test_score
model_selection.validation_curve

Visualization
-------------

.. currentmodule:: sklearn

.. autosummary::
:toctree: generated/
:template: class.rst

model_selection.LearningCurveDisplay

.. _multiclass_ref:

:mod:`sklearn.multiclass`: Multiclass classification
Expand Down
22 changes: 20 additions & 2 deletions doc/modules/learning_curve.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ The function :func:`validation_curve` can help in this case::
If the training score and the validation score are both low, the estimator will
be underfitting. If the training score is high and the validation score is low,
the estimator is overfitting and otherwise it is working very well. A low
training score and a high validation score is usually not possible. Underfitting,
overfitting, and a working model are shown in the in the plot below where we vary
training score and a high validation score is usually not possible. Underfitting,
overfitting, and a working model are shown in the in the plot below where we vary
the parameter :math:`\gamma` of an SVM on the digits dataset.

.. figure:: ../auto_examples/model_selection/images/sphx_glr_plot_validation_curve_001.png
Expand Down Expand Up @@ -149,3 +149,21 @@ average scores on the validation sets)::
[1. , 0.96..., 1. , 1. , 0.96...],
[1. , 0.96..., 1. , 1. , 0.96...]])

If you intend to plot the learning curves only, the class
:class:`~sklearn.model_selection.LearningCurveDisplay` will be easier to use.
You can use the method
:meth:`~sklearn.model_selection.LearningCurveDisplay.from_estimator` similarly
to :func:`learning_curve` to generate and plot the learning curve:

.. plot::
:context: close-figs
:align: center

from sklearn.datasets import load_iris
from sklearn.model_selection import LearningCurveDisplay
from sklearn.svm import SVC
from sklearn.utils import shuffle
X, y = load_iris(return_X_y=True)
X, y = shuffle(X, y, random_state=0)
LearningCurveDisplay.from_estimator(
SVC(kernel="linear"), X, y, train_sizes=[50, 80, 110], cv=5)
3 changes: 2 additions & 1 deletion doc/visualizations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ instead. In the following example, we plot a ROC curve for a fitted support
vector machine:

.. plot::
:context:
:context: close-figs
:align: center

from sklearn.model_selection import train_test_split
Expand Down Expand Up @@ -87,3 +87,4 @@ Display Objects
metrics.DetCurveDisplay
metrics.PrecisionRecallDisplay
metrics.RocCurveDisplay
model_selection.LearningCurveDisplay
5 changes: 5 additions & 0 deletions doc/whats_new/v1.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,11 @@ Changelog
scores will all be set to the maximum possible rank.
:pr:`24543` by :user:`Guillaume Lemaitre <glemaitre>`.

- |Feature| Added the class :class:`model_selection.LearningCurveDisplay`
that allows to make easy plotting of learning curves obtained by the function
:func:`model_selection.learning_curve`.
:pr:`24084` by :user:`Guillaume Lemaitre <glemaitre>`.

:mod:`sklearn.multioutput`
..........................

Expand Down
42 changes: 17 additions & 25 deletions examples/miscellaneous/plot_kernel_ridge_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,35 +189,27 @@
# %%
# Visualize the learning curves
# -----------------------------
from sklearn.model_selection import LearningCurveDisplay

from sklearn.model_selection import learning_curve

plt.figure()
_, ax = plt.subplots()

svr = SVR(kernel="rbf", C=1e1, gamma=0.1)
kr = KernelRidge(kernel="rbf", alpha=0.1, gamma=0.1)
train_sizes, train_scores_svr, test_scores_svr = learning_curve(
svr,
X[:100],
y[:100],
train_sizes=np.linspace(0.1, 1, 10),
scoring="neg_mean_squared_error",
cv=10,
)
train_sizes_abs, train_scores_kr, test_scores_kr = learning_curve(
kr,
X[:100],
y[:100],
train_sizes=np.linspace(0.1, 1, 10),
scoring="neg_mean_squared_error",
cv=10,
)

plt.plot(train_sizes, -test_scores_kr.mean(1), "o--", color="g", label="KRR")
plt.plot(train_sizes, -test_scores_svr.mean(1), "o--", color="r", label="SVR")
plt.xlabel("Train size")
plt.ylabel("Mean Squared Error")
plt.title("Learning curves")
plt.legend(loc="best")
common_params = {
"X": X[:100],
"y": y[:100],
"train_sizes": np.linspace(0.1, 1, 10),
"scoring": "neg_mean_squared_error",
"negate_score": True,
"score_name": "Mean Squared Error",
"std_display_style": None,
"ax": ax,
}

LearningCurveDisplay.from_estimator(svr, **common_params)
LearningCurveDisplay.from_estimator(kr, **common_params)
ax.set_title("Learning curves")
ax.legend(handles=ax.get_legend_handles_labels()[0], labels=["SVR", "KRR"])

plt.show()
Loading