-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG] MNT Remove code deprecated in 0.18 #10094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Apparently |
This pull request introduces 1 alert and fixes 3 - view on lgtm.com new alerts:
fixed alerts:
Comment posted by lgtm.com |
675c51e
to
a651476
Compare
This pull request fixes 3 alerts - view on lgtm.com fixed alerts:
Comment posted by lgtm.com |
30283eb
to
6044f7f
Compare
Is there any reason to keep this? scikit-learn/sklearn/multioutput.py Lines 282 to 285 in 3111b8e
|
e529e0a
to
9f8741d
Compare
This pull request fixes 6 alerts - view on lgtm.com fixed alerts:
Comment posted by lgtm.com |
@massich Thanks for the work :) Some suggestions: |
9f8741d
to
2ec39c0
Compare
This pull request fixes 6 alerts - view on lgtm.com fixed alerts:
Comment posted by lgtm.com |
6558ae8
to
ec2b65b
Compare
fixup! remove RandomizedPCA from docs references etc
Remove mixture/gmm
ec2b65b
to
2ffa7bd
Compare
@@ -499,25 +499,6 @@ def test_scorer_memmap_input(): | |||
yield check_scorer_memmap, name | |||
|
|||
|
|||
def test_deprecated_names(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this should go out in version 0.20
and if so, if classes.rst
is correct anymore. here:
scikit-learn/doc/modules/classes.rst
Lines 779 to 805 in 01e0639
.. autosummary:: | |
:toctree: generated/ | |
:template: function.rst | |
metrics.accuracy_score | |
metrics.auc | |
metrics.average_precision_score | |
metrics.balanced_accuracy_score | |
metrics.brier_score_loss | |
metrics.classification_report | |
metrics.cohen_kappa_score | |
metrics.confusion_matrix | |
metrics.f1_score | |
metrics.fbeta_score | |
metrics.hamming_loss | |
metrics.hinge_loss | |
metrics.jaccard_similarity_score | |
metrics.log_loss | |
metrics.matthews_corrcoef | |
metrics.precision_recall_curve | |
metrics.precision_recall_fscore_support | |
metrics.precision_score | |
metrics.recall_score | |
metrics.roc_auc_score | |
metrics.roc_curve | |
metrics.zero_one_loss | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, classes.rst is still valid. This deprecation only pertains to getting scorers by a string.
What do we do with these two lost reference to scikit-learn/doc/modules/classes.rst Line 1413 in 01e0639
|
541c31c
to
b36341e
Compare
This pull request fixes 5 alerts - view on lgtm.com fixed alerts:
Comment posted by lgtm.com |
This pull request fixes 5 alerts - view on lgtm.com fixed alerts:
Comment posted by lgtm.com |
I think it might be better to finish the deprecation to avoid some unnecessary change in other PR. Since there's lots of work, maybe we can review and merge part of it every time. |
I would've liked it if the class and module deprecations happened first in one chunk, then work on the smaller fries... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the entries from the "Deprecated" section in classes.rst.
doc/modules/dp-derivation.rst still references :class:`GMM`
Removed modules are still referenced in sklearn/tests/test_docstring_parameters.py
sklearn/utils/estimator_checks.py still mentions GaussianProcess.
Otherwise LGTM as a first shot. Put the others into separate issue.
@@ -116,9 +111,7 @@ def variable_batch_size_comparison(data): | |||
all_times = defaultdict(list) | |||
all_errors = defaultdict(list) | |||
pca = PCA(n_components=n_components) | |||
rpca = RandomizedPCA(n_components=n_components, random_state=1999) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be reporting PCA(svd_solver='randomized') instead?
@@ -225,18 +225,13 @@ def get_scorer(scoring): | |||
scorer : callable | |||
The scorer. | |||
""" | |||
valid = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should leave this code in in case of future deprecations. Or else just note somewhere that if deprecations are needed, SCORER can be redefined as a DeprecationDict, but keys
etc then need to be reimplemented to hide deprecated keys.
@@ -499,25 +499,6 @@ def test_scorer_memmap_input(): | |||
yield check_scorer_memmap, name | |||
|
|||
|
|||
def test_deprecated_names(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, classes.rst is still valid. This deprecation only pertains to getting scorers by a string.
@massich, should we find someone else to complete this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please rebase
This would very helpful, do you still have some bandwidth to work on it @massich or should it be taken over? |
I might revive #9570 and/or try to merge this one with that one. |
Sorry I didn't realize this was a take-over of my PR (which was forever stalled). I can take the wheel again if @massich is busy, but either is fine for me. |
yes go for it, I've been trying to put time on it and it didn't happen. So
retake it :)
…On Tue, May 22, 2018 at 1:16 AM Andreas Mueller ***@***.***> wrote:
Sorry I didn't realize this was a take-over of my PR (which was forever
stalled). I can take the wheel again if @massich
<https://github.com/massich> is busy, but either is fine for me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10094 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGt-41ozui16VNpSRz0tIQdo9gQkboUlks5t00rKgaJpZM4QX7lz>
.
|
I guess we can close this one. @amueller do you mind doing the honors? |
Closing in favor or #9570. |
Remove code tagged to be removed in v.0.20. This PR takes over #9570 (hopefully I've migratted everything).
Things to remove:
Classes (reported here)
from whats new reported here
Linear, kernelized and related models
residual_metric
has been deprecated in :class:linear_model.RANSACRegressor
. Useloss
instead. ByManoj Kumar
_..X_
and.y_
has been deprecated in :class:isotonic.IsotonicRegression
. By :user:Jonathan Arfa <jarfa>
.Decomposition, manifold learning and clustering
mixture.DPGMM
is deprecated in favor of the new :class:mixture.BayesianGaussianMixture
(with the parameterweight_concentration_prior_type='dirichlet_process'
). The new class solves the computational problems of the old class and computes the Gaussian mixture with a Dirichlet process prior faster than before. :issue:7295
by :user:Wei Xue <xuewei4d>
and :user:Thierry Guillemot <tguillemot>
.mixture.VBGMM
is deprecated in favor of the new :class:mixture.BayesianGaussianMixture
(with the parameterweight_concentration_prior_type='dirichlet_distribution'
). The new class solves the computational problems of the old class and computes the Variational Bayesian Gaussian mixture faster than before. :issue:6651
by :user:Wei Xue <xuewei4d>
and :user:Thierry Guillemot <tguillemot>
.mixture.GMM
is deprecated in favor of the new :class:mixture.GaussianMixture
. The new class computes the Gaussian mixture faster than before and some of computational problems have been solved. :issue:6666
by :user:Wei Xue <xuewei4d>
and :user:Thierry Guillemot <tguillemot>
.Model evaluation and meta-estimators
The :mod:
sklearn.cross_validation
, :mod:sklearn.grid_search
and :mod:sklearn.learning_curve
have been deprecated and the classes and functions have been reorganized into the :mod:sklearn.model_selection
module. Ref :ref:model_selection_changes
for more information. :issue:4294
byRaghav RV
_.The
grid_scores_
attribute of :class:model_selection.GridSearchCV
and :class:model_selection.RandomizedSearchCV
is deprecated in favor of the attributecv_results_
. Ref :ref:model_selection_changes
for more information. :issue:6697
byRaghav RV
_.The parameters
n_iter
orn_folds
in old CV splitters are replaced by the new parametern_splits
since it can provide a consistent and unambiguous interface to represent the number of train-test splits. :issue:7187
by :user:YenChen Lin <yenchenlin>
.classes
parameter was renamed tolabels
in :func:metrics.hamming_loss
. :issue:7260
by :user:Sebastián Vanrell <srvanrell>
.The splitter classes
LabelKFold
,LabelShuffleSplit
,LeaveOneLabelOut
andLeavePLabelsOut
are renamed to :class:model_selection.GroupKFold
, :class:model_selection.GroupShuffleSplit
, :class:model_selection.LeaveOneGroupOut
and :class:model_selection.LeavePGroupsOut
respectively. Also the parameterlabels
in the :func:split
method of the newly renamed splitters :class:model_selection.LeaveOneGroupOut
and :class:model_selection.LeavePGroupsOut
is renamed togroups
. Additionally in :class:model_selection.LeavePGroupsOut
, the parametern_labels
is renamed ton_groups
. :issue:6660
byRaghav RV
_.Error and loss names for
scoring
parameters are now prefixed by'neg_'
, such asneg_mean_squared_error
. The unprefixed versions are deprecated and will be removed in version 0.20. :issue:7261
by :user:Tim Head <betatim>
.files with remaining deprecated lines