ANN Scikit-learn 0.18 released
Hi everybody. I'm happy to announce scikit-learn 0.18 has been released today. You can install from pipy or anaconda.org: pip install --upgrade scikit-learn --no-deps or if you prefer conda: conda update scikit-learn A big thank you to everybody who contributed. This one took us a while, but I think it's worth the wait. Highlights include: - A new GaussianProcessClassifier and GaussianProcessRegressor to learn complex kernels! - A much improved GaussianMixture and BayesianGaussianMixture mixture models. - We moved the content of the grid_search, cross_validation and validation_curve modules to the new model_selection module. - A Multi-layer perceptron. and soo much more that it's impossible to summarize. Check out the full changelog here: http://scikit-learn.org/stable/whats_new.html#version-0-18 Please don't update a (ana)conda installation using pip, as that might lead to problems. Let us know any issues you have on the issue tracker: https://github.com/scikit-learn/scikit-learn/issues Enjoy! Andy
Hurray! Congratulations to everybody, and in particular the release time! Gaël On Wed, Sep 28, 2016 at 05:01:45PM -0400, Andreas Mueller wrote:
Hi everybody.
I'm happy to announce scikit-learn 0.18 has been released today. You can install from pipy or anaconda.org:
pip install --upgrade scikit-learn --no-deps
or if you prefer conda:
conda update scikit-learn
A big thank you to everybody who contributed. This one took us a while, but I think it's worth the wait.
Highlights include: - A new GaussianProcessClassifier and GaussianProcessRegressor to learn complex kernels! - A much improved GaussianMixture and BayesianGaussianMixture mixture models. - We moved the content of the grid_search, cross_validation and validation_curve modules to the new model_selection module. - A Multi-layer perceptron.
and soo much more that it's impossible to summarize. Check out the full changelog here:
Please don't update a (ana)conda installation using pip, as that might lead to problems. Let us know any issues you have on the issue tracker: https://github.com/scikit-learn/scikit-learn/issues
Enjoy!
Andy _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
-- Gael Varoquaux Researcher, INRIA Parietal NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France Phone: ++ 33-1-69-08-79-68 http://gael-varoquaux.info http://twitter.com/GaelVaroquaux
Have been playing around with the new functionality tonight. There are so many great additions, especially the new CV functionality in the model_selection module is super great. Nested CV is much more convenient now! Congratulations to everyone, and thanks for this great new version! :)
On Sep 29, 2016, at 1:28 AM, Gael Varoquaux <gael.varoquaux@normalesup.org> wrote:
Hurray!
Congratulations to everybody, and in particular the release time!
Gaël
On Wed, Sep 28, 2016 at 05:01:45PM -0400, Andreas Mueller wrote:
Hi everybody.
I'm happy to announce scikit-learn 0.18 has been released today. You can install from pipy or anaconda.org:
pip install --upgrade scikit-learn --no-deps
or if you prefer conda:
conda update scikit-learn
A big thank you to everybody who contributed. This one took us a while, but I think it's worth the wait.
Highlights include: - A new GaussianProcessClassifier and GaussianProcessRegressor to learn complex kernels! - A much improved GaussianMixture and BayesianGaussianMixture mixture models. - We moved the content of the grid_search, cross_validation and validation_curve modules to the new model_selection module. - A Multi-layer perceptron.
and soo much more that it's impossible to summarize. Check out the full changelog here:
Please don't update a (ana)conda installation using pip, as that might lead to problems. Let us know any issues you have on the issue tracker: https://github.com/scikit-learn/scikit-learn/issues
Enjoy!
Andy _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
-- Gael Varoquaux Researcher, INRIA Parietal NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France Phone: ++ 33-1-69-08-79-68 http://gael-varoquaux.info http://twitter.com/GaelVaroquaux _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
(this has been in drafts a few days and I'm sure there's plenty I've missed from the lists below) Well done, everyone! The size of this release - and the group of people that contributed to it - is even a bit overwhelming. Thanks for managing the release, Andy... and writing it up as a book! We've got a lot in the works already for 0.19. There are a number of things that have been a long time coming and which I'd really like to see happen, such as: * multiple metrics for cross validation (#7388 et al.) * documenting and officially making (most) utils public (#6616) * indicator features for Imputer, done right (#6556) * KNN imputation (#2989, #4844) * ColumnTransformer or similar for heterogeneous data (#2034, #886) * dataset resampling (#1454) * string handling in OneHotEncoder (#7327) * interpolation in average_precision_score (#7356) * tree categorical splits (#4899) * k-best feature selection from a model's feature_importances_ (#6717) * ? feature name transformation (#6425) * ? sample_weight support in CV scoring (#1179, #2879, #3524, #1574; perhaps this isn't as easy as it looks) There are things that are important but will probably require more work: * making common tests and their exceptions more general (perhaps by way of "estimator tags") * improving our LSH offerings and integration It's all a bit overwhelming and all help ensuring that the issue backlog is tracked, and that the solutions are designed, built and reviewed would be most welcome! J On 29 September 2016 at 15:34, Sebastian Raschka <se.raschka@gmail.com> wrote:
Have been playing around with the new functionality tonight. There are so many great additions, especially the new CV functionality in the model_selection module is super great. Nested CV is much more convenient now! Congratulations to everyone, and thanks for this great new version! :)
On Sep 29, 2016, at 1:28 AM, Gael Varoquaux < gael.varoquaux@normalesup.org> wrote:
Hurray!
Congratulations to everybody, and in particular the release time!
Gaël
On Wed, Sep 28, 2016 at 05:01:45PM -0400, Andreas Mueller wrote:
Hi everybody.
I'm happy to announce scikit-learn 0.18 has been released today. You can install from pipy or anaconda.org:
pip install --upgrade scikit-learn --no-deps
or if you prefer conda:
conda update scikit-learn
A big thank you to everybody who contributed. This one took us a while, but I think it's worth the wait.
Highlights include: - A new GaussianProcessClassifier and GaussianProcessRegressor to learn complex kernels! - A much improved GaussianMixture and BayesianGaussianMixture mixture models. - We moved the content of the grid_search, cross_validation and validation_curve modules to the new model_selection module. - A Multi-layer perceptron.
and soo much more that it's impossible to summarize. Check out the full changelog here:
Please don't update a (ana)conda installation using pip, as that might lead to problems. Let us know any issues you have on the issue tracker: https://github.com/scikit-learn/scikit-learn/issues
Enjoy!
Andy _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
-- Gael Varoquaux Researcher, INRIA Parietal NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France Phone: ++ 33-1-69-08-79-68 http://gael-varoquaux.info http://twitter.com/ GaelVaroquaux _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
On 09/29/2016 11:07 PM, Joel Nothman wrote:
(this has been in drafts a few days and I'm sure there's plenty I've missed from the lists below)
Well done, everyone! The size of this release - and the group of people that contributed to it - is even a bit overwhelming. Thanks for managing the release, Andy... and writing it up as a book! Thank you for your incredible dedication!
We've got a lot in the works already for 0.19.
There are a number of things that have been a long time coming and which I'd really like to see happen, such as:
* multiple metrics for cross validation (#7388 et al.) * documenting and officially making (most) utils public (#6616) * indicator features for Imputer, done right (#6556) * KNN imputation (#2989, #4844) * ColumnTransformer or similar for heterogeneous data (#2034, #886) * dataset resampling (#1454) * string handling in OneHotEncoder (#7327) * interpolation in average_precision_score (#7356) * tree categorical splits (#4899) * k-best feature selection from a model's feature_importances_ (#6717) * ? feature name transformation (#6425) * ? sample_weight support in CV scoring (#1179, #2879, #3524, #1574; perhaps this isn't as easy as it looks)
There are things that are important but will probably require more work:
* making common tests and their exceptions more general (perhaps by way of "estimator tags") * improving our LSH offerings and integration
It's good to see that you're excited about the same things as me. I also want to do the numpy-doc update, as it gives SOOO much better error messages now. I'll try to put some time into the public utils soon, and I think the interpolation in average precision is basically done! I think many of the other things you mentioned are already well on their way, and maybe we can get 0.19 out within the next 4 month, to get back on a more regular schedule.
Hello community, Congratulations on the release of 0.19 ! While I'm merely a casual user and wish I could contribute more often, I thank everyone for their time and efforts! 2016-10-01 1:58 GMT+09:00 Andreas Mueller <t3kcit@gmail.com>: We've got a lot in the works already for 0.19.
* multiple metrics for cross validation (#7388 et al.)
I've done something like this in my internal model building and selection libraries. My solution has been to have -each metric object be able to explain a "distance from optimal" -a metric collection object, which can be built by either explicit instantiation or calculation using data -a pareto curve calculation object -a ranker for the points on the pareto curve, with the ability to select the N-best points. While there are certainly smarter interfaces and implementations, here is an example of one of my doctests that may help get this PR started. My apologies that my old docstring argument notation doesn't match the commonly used standards. Hope this helps, J.B. Brown Kyoto University 26 class TrialRanker(object): 27 """An object for handling the generic mechanism of selecting optimal 28 trials from a colletion of trials.""" 43 def SelectBest(self, metricSets, paretoAlg, 44 preProcessor=None): 45 """Select the best [metricSets] by using the 46 [paretoAlg] pareto selection object. Note that it is actually 47 the [paretoAlg] that specifies how many optimal [metricSets] to 48 select. 49 50 Data may be pre-processed into a form necessary for the [paretoAlg] 51 by using the [preProcessor] that is a MetricSetConverter. 52 53 Return: an EvaluatedMetricSet if [paretoAlg] selects only one 54 metric set, otherwise a list of EvaluatedMetricSet objects. 55 56 >>> from pareto.paretoDecorators import MinNormSelector 57 >>> from pareto import OriginBasePareto 58 >>> pAlg = MinNormSelector(OriginBasePareto()) 59 60 >>> from metrics.TwoClassMetrics import Accuracy, Sensitivity 61 >>> from metrics.metricSet import EvaluatedMetricSet 62 >>> met1 = EvaluatedMetricSet.BuildByExplicitValue( 63 ... [(Accuracy, 0.7), (Sensitivity, 0.9)]) 64 >>> met1.SetTitle("Example1") 65 >>> met1.associatedData = range(5) # property set/get 66 >>> met2 = EvaluatedMetricSet.BuildByExplicitValue( 67 ... [(Accuracy, 0.8), (Sensitivity, 0.6)]) 68 >>> met2.SetTitle("Example2") 69 >>> met2.SetAssociatedData("abcdef") # explicit method call 70 >>> met3 = EvaluatedMetricSet.BuildByExplicitValue( 71 ... [(Accuracy, 0.5), (Sensitivity, 0.5)]) 72 >>> met3.SetTitle("Example3") 73 >>> met3.associatedData = float 74 75 >>> from metrics.metricSet.converters import OptDistConverter 76 77 >>> ranker = TrialRanker() # pAlg selects met1 78 >>> best = ranker.SelectBest((met1,met2,met3), 79 ... pAlg, OptDistConverter()) 80 >>> best.VerboseDescription(True) 81 >>> str(best) 82 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 83 >>> best.associatedData 84 [0, 1, 2, 3, 4] 85 86 >>> pAlg = MinNormSelector(OriginBasePareto(), nSelect=2) 87 >>> best = ranker.SelectBest((met1,met2,met3), 88 ... pAlg, OptDistConverter()) 89 >>> for metSet in best: 90 ... metSet.VerboseDescription(True) 91 ... str(metSet) 92 ... str(metSet.associatedData) 93 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 94 '[0, 1, 2, 3, 4]' 95 'Example2: 2 metrics; Accuracy=0.800; Sensitivity=0.600' 96 'abcdef' 97 98 >>> from metrics.TwoClassMetrics import PositivePredictiveValue 99 >>> met4 = EvaluatedMetricSet.BuildByExplicitValue( 100 ... [(Accuracy, 0.7), (PositivePredictiveValue, 0.5)]) 101 >>> best = ranker.SelectBest((met1,met2,met3,met4), 102 ... pAlg, OptDistConverter()) 103 Traceback (most recent call last): 104 ... 105 ValueError: Metric sets contain differing Metrics.
Hi Brown, Thanks for the email. There is a working PR here at https://github.com/scikit-learn/scikit-learn/pull/7388 Would you be kind to take a look at it and comment how helpful the proposed API is for your use case? Thanks On Mon, Oct 3, 2016 at 6:05 AM, Brown J.B. <jbbrown@kuhp.kyoto-u.ac.jp> wrote:
Hello community,
Congratulations on the release of 0.19 ! While I'm merely a casual user and wish I could contribute more often, I thank everyone for their time and efforts!
2016-10-01 1:58 GMT+09:00 Andreas Mueller <t3kcit@gmail.com>:
We've got a lot in the works already for 0.19.
* multiple metrics for cross validation (#7388 et al.)
I've done something like this in my internal model building and selection libraries. My solution has been to have -each metric object be able to explain a "distance from optimal" -a metric collection object, which can be built by either explicit instantiation or calculation using data -a pareto curve calculation object -a ranker for the points on the pareto curve, with the ability to select the N-best points.
While there are certainly smarter interfaces and implementations, here is an example of one of my doctests that may help get this PR started. My apologies that my old docstring argument notation doesn't match the commonly used standards.
Hope this helps, J.B. Brown Kyoto University
26 class TrialRanker(object):
27 """An object for handling the generic mechanism of selecting optimal 28 trials from a colletion of trials."""
43 def SelectBest(self, metricSets, paretoAlg,
44 preProcessor=None):
45 """Select the best [metricSets] by using the 46 [paretoAlg] pareto selection object. Note that it is actually 47 the [paretoAlg] that specifies how many optimal [metricSets] to 48 select.
49
50 Data may be pre-processed into a form necessary for the [paretoAlg] 51 by using the [preProcessor] that is a MetricSetConverter. 52
53 Return: an EvaluatedMetricSet if [paretoAlg] selects only one 54 metric set, otherwise a list of EvaluatedMetricSet objects. 55
56 >>> from pareto.paretoDecorators import MinNormSelector 57 >>> from pareto import OriginBasePareto
58 >>> pAlg = MinNormSelector(OriginBasePare to()) 59
60 >>> from metrics.TwoClassMetrics import Accuracy, Sensitivity 61 >>> from metrics.metricSet import EvaluatedMetricSet 62 >>> met1 = EvaluatedMetricSet.BuildByExpl icitValue( 63 ... [(Accuracy, 0.7), (Sensitivity, 0.9)]) 64 >>> met1.SetTitle("Example1")
65 >>> met1.associatedData = range(5) # property set/get 66 >>> met2 = EvaluatedMetricSet.BuildByExpl icitValue( 67 ... [(Accuracy, 0.8), (Sensitivity, 0.6)]) 68 >>> met2.SetTitle("Example2")
69 >>> met2.SetAssociatedData("abcdef") # explicit method call 70 >>> met3 = EvaluatedMetricSet.BuildByExpl icitValue( 71 ... [(Accuracy, 0.5), (Sensitivity, 0.5)]) 72 >>> met3.SetTitle("Example3")
73 >>> met3.associatedData = float
74
75 >>> from metrics.metricSet.converters import OptDistConverter 76
77 >>> ranker = TrialRanker() # pAlg selects met1 78 >>> best = ranker.SelectBest((met1,met2,m et3), 79 ... pAlg, OptDistConverter()) 80 >>> best.VerboseDescription(True)
81 >>> str(best)
82 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 83 >>> best.associatedData
84 [0, 1, 2, 3, 4]
85
86 >>> pAlg = MinNormSelector(OriginBasePareto(), nSelect=2) 87 >>> best = ranker.SelectBest((met1,met2,m et3), 88 ... pAlg, OptDistConverter()) 89 >>> for metSet in best:
90 ... metSet.VerboseDescription(True ) 91 ... str(metSet)
92 ... str(metSet.associatedData)
93 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 94 '[0, 1, 2, 3, 4]'
95 'Example2: 2 metrics; Accuracy=0.800; Sensitivity=0.600' 96 'abcdef'
97
98 >>> from metrics.TwoClassMetrics import PositivePredictiveValue 99 >>> met4 = EvaluatedMetricSet.BuildByExpl icitValue( 100 ... [(Accuracy, 0.7), (PositivePredictiveValue, 0.5)]) 101 >>> best = ranker.SelectBest((met1,met2,m et3,met4), 102 ... pAlg, OptDistConverter()) 103 Traceback (most recent call last):
104 ...
105 ValueError: Metric sets contain differing Metrics.
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
Congratulations to all contributors! I would like to update to the new version using conda, but apparently it is not available: ~$ conda update scikit-learn Fetching package metadata ....... Solving package specifications: .......... # All requested packages already installed. # packages in environment at /home/pbialecki/anaconda2: # scikit-learn 0.17.1 np110py27_2 Should I reinstall scikit? Best regards, Piotr On 03.10.2016 18:23, Raghav R V wrote: Hi Brown, Thanks for the email. There is a working PR here at <https://github.com/scikit-learn/scikit-learn/pull/7388> https://github.com/scikit-learn/scikit-learn/pull/7388 Would you be kind to take a look at it and comment how helpful the proposed API is for your use case? Thanks On Mon, Oct 3, 2016 at 6:05 AM, Brown J.B. <jbbrown@kuhp.kyoto-u.ac.jp<mailto:jbbrown@kuhp.kyoto-u.ac.jp>> wrote: Hello community, Congratulations on the release of 0.19 ! While I'm merely a casual user and wish I could contribute more often, I thank everyone for their time and efforts! 2016-10-01 1:58 GMT+09:00 Andreas Mueller <<mailto:t3kcit@gmail.com>t3kcit@gmail.com<mailto:t3kcit@gmail.com>>: We've got a lot in the works already for 0.19. * multiple metrics for cross validation (#7388 et al.) I've done something like this in my internal model building and selection libraries. My solution has been to have -each metric object be able to explain a "distance from optimal" -a metric collection object, which can be built by either explicit instantiation or calculation using data -a pareto curve calculation object -a ranker for the points on the pareto curve, with the ability to select the N-best points. While there are certainly smarter interfaces and implementations, here is an example of one of my doctests that may help get this PR started. My apologies that my old docstring argument notation doesn't match the commonly used standards. Hope this helps, J.B. Brown Kyoto University 26 class TrialRanker(object): 27 """An object for handling the generic mechanism of selecting optimal 28 trials from a colletion of trials.""" 43 def SelectBest(self, metricSets, paretoAlg, 44 preProcessor=None): 45 """Select the best [metricSets] by using the 46 [paretoAlg] pareto selection object. Note that it is actually 47 the [paretoAlg] that specifies how many optimal [metricSets] to 48 select. 49 50 Data may be pre-processed into a form necessary for the [paretoAlg] 51 by using the [preProcessor] that is a MetricSetConverter. 52 53 Return: an EvaluatedMetricSet if [paretoAlg] selects only one 54 metric set, otherwise a list of EvaluatedMetricSet objects. 55 56 >>> from pareto.paretoDecorators import MinNormSelector 57 >>> from pareto import OriginBasePareto 58 >>> pAlg = MinNormSelector(OriginBasePareto()) 59 60 >>> from metrics.TwoClassMetrics import Accuracy, Sensitivity 61 >>> from metrics.metricSet import EvaluatedMetricSet 62 >>> met1 = EvaluatedMetricSet.BuildByExplicitValue( 63 ... [(Accuracy, 0.7), (Sensitivity, 0.9)]) 64 >>> met1.SetTitle("Example1") 65 >>> met1.associatedData = range(5) # property set/get 66 >>> met2 = EvaluatedMetricSet.BuildByExplicitValue( 67 ... [(Accuracy, 0.8), (Sensitivity, 0.6)]) 68 >>> met2.SetTitle("Example2") 69 >>> met2.SetAssociatedData("abcdef") # explicit method call 70 >>> met3 = EvaluatedMetricSet.BuildByExplicitValue( 71 ... [(Accuracy, 0.5), (Sensitivity, 0.5)]) 72 >>> met3.SetTitle("Example3") 73 >>> met3.associatedData = float 74 75 >>> from metrics.metricSet.converters import OptDistConverter 76 77 >>> ranker = TrialRanker() # pAlg selects met1 78 >>> best = ranker.SelectBest((met1,met2,met3), 79 ... pAlg, OptDistConverter()) 80 >>> best.VerboseDescription(True) 81 >>> str(best) 82 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 83 >>> best.associatedData 84 [0, 1, 2, 3, 4] 85 86 >>> pAlg = MinNormSelector(OriginBasePareto(), nSelect=2) 87 >>> best = ranker.SelectBest((met1,met2,met3), 88 ... pAlg, OptDistConverter()) 89 >>> for metSet in best: 90 ... metSet.VerboseDescription(True) 91 ... str(metSet) 92 ... str(metSet.associatedData) 93 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 94 '[0, 1, 2, 3, 4]' 95 'Example2: 2 metrics; Accuracy=0.800; Sensitivity=0.600' 96 'abcdef' 97 98 >>> from metrics.TwoClassMetrics import PositivePredictiveValue 99 >>> met4 = EvaluatedMetricSet.BuildByExplicitValue( 100 ... [(Accuracy, 0.7), (PositivePredictiveValue, 0.5)]) 101 >>> best = ranker.SelectBest((met1,met2,met3,met4), 102 ... pAlg, OptDistConverter()) 103 Traceback (most recent call last): 104 ... 105 ValueError: Metric sets contain differing Metrics. _______________________________________________ scikit-learn mailing list scikit-learn@python.org<mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn _______________________________________________ scikit-learn mailing list scikit-learn@python.org<mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn
Hi Piotr, I've been there - most probably some package is blocking you to update via numpy dependency. Try to update numpy first and the conflicting package should pop up: "conda update numpy=1.11" ---- Pozdrawiam, | Best regards, Maciek Wójcikowski maciek@wojcikowski.pl 2016-10-11 14:32 GMT+02:00 Piotr Bialecki <piotr.bialecki@hotmail.de>:
Congratulations to all contributors!
I would like to update to the new version using conda, but apparently it is not available:
~$ conda update scikit-learn Fetching package metadata ....... Solving package specifications: ..........
# All requested packages already installed. # packages in environment at /home/pbialecki/anaconda2: # scikit-learn 0.17.1 np110py27_2
Should I reinstall scikit?
Best regards, Piotr
On 03.10.2016 18:23, Raghav R V wrote:
Hi Brown,
Thanks for the email. There is a working PR here at <https://github.com/scikit-learn/scikit-learn/pull/7388> https://github.com/scikit-learn/scikit-learn/pull/7388
Would you be kind to take a look at it and comment how helpful the proposed API is for your use case?
Thanks
On Mon, Oct 3, 2016 at 6:05 AM, Brown J.B. <jbbrown@kuhp.kyoto-u.ac.jp> wrote:
Hello community,
Congratulations on the release of 0.19 ! While I'm merely a casual user and wish I could contribute more often, I thank everyone for their time and efforts!
2016-10-01 1:58 GMT+09:00 Andreas Mueller < <t3kcit@gmail.com> t3kcit@gmail.com>:
We've got a lot in the works already for 0.19.
* multiple metrics for cross validation (#7388 et al.)
I've done something like this in my internal model building and selection libraries. My solution has been to have -each metric object be able to explain a "distance from optimal" -a metric collection object, which can be built by either explicit instantiation or calculation using data -a pareto curve calculation object -a ranker for the points on the pareto curve, with the ability to select the N-best points.
While there are certainly smarter interfaces and implementations, here is an example of one of my doctests that may help get this PR started. My apologies that my old docstring argument notation doesn't match the commonly used standards.
Hope this helps, J.B. Brown Kyoto University
26 class TrialRanker(object):
27 """An object for handling the generic mechanism of selecting optimal 28 trials from a colletion of trials."""
43 def SelectBest(self, metricSets, paretoAlg,
44 preProcessor=None):
45 """Select the best [metricSets] by using the 46 [paretoAlg] pareto selection object. Note that it is actually 47 the [paretoAlg] that specifies how many optimal [metricSets] to 48 select.
49
50 Data may be pre-processed into a form necessary for the [paretoAlg] 51 by using the [preProcessor] that is a MetricSetConverter. 52
53 Return: an EvaluatedMetricSet if [paretoAlg] selects only one 54 metric set, otherwise a list of EvaluatedMetricSet objects. 55
56 >>> from pareto.paretoDecorators import MinNormSelector 57 >>> from pareto import OriginBasePareto
58 >>> pAlg = MinNormSelector(OriginBasePare to()) 59
60 >>> from metrics.TwoClassMetrics import Accuracy, Sensitivity 61 >>> from metrics.metricSet import EvaluatedMetricSet 62 >>> met1 = EvaluatedMetricSet.BuildByExpl icitValue( 63 ... [(Accuracy, 0.7), (Sensitivity, 0.9)]) 64 >>> met1.SetTitle("Example1")
65 >>> met1.associatedData = range(5) # property set/get 66 >>> met2 = EvaluatedMetricSet.BuildByExpl icitValue( 67 ... [(Accuracy, 0.8), (Sensitivity, 0.6)]) 68 >>> met2.SetTitle("Example2")
69 >>> met2.SetAssociatedData("abcdef") # explicit method call 70 >>> met3 = EvaluatedMetricSet.BuildByExpl icitValue( 71 ... [(Accuracy, 0.5), (Sensitivity, 0.5)]) 72 >>> met3.SetTitle("Example3")
73 >>> met3.associatedData = float
74
75 >>> from metrics.metricSet.converters import OptDistConverter 76
77 >>> ranker = TrialRanker() # pAlg selects met1 78 >>> best = ranker.SelectBest((met1,met2,m et3), 79 ... pAlg, OptDistConverter()) 80 >>> best.VerboseDescription(True)
81 >>> str(best)
82 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 83 >>> best.associatedData
84 [0, 1, 2, 3, 4]
85
86 >>> pAlg = MinNormSelector(OriginBasePareto(), nSelect=2) 87 >>> best = ranker.SelectBest((met1,met2,m et3), 88 ... pAlg, OptDistConverter()) 89 >>> for metSet in best:
90 ... metSet.VerboseDescription(True ) 91 ... str(metSet)
92 ... str(metSet.associatedData)
93 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 94 '[0, 1, 2, 3, 4]'
95 'Example2: 2 metrics; Accuracy=0.800; Sensitivity=0.600' 96 'abcdef'
97
98 >>> from metrics.TwoClassMetrics import PositivePredictiveValue 99 >>> met4 = EvaluatedMetricSet.BuildByExpl icitValue( 100 ... [(Accuracy, 0.7), (PositivePredictiveValue, 0.5)]) 101 >>> best = ranker.SelectBest((met1,met2,m et3,met4), 102 ... pAlg, OptDistConverter()) 103 Traceback (most recent call last):
104 ...
105 ValueError: Metric sets contain differing Metrics.
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing listscikit-learn@python.orghttps://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
Hi Maciek, thank you very much! Numpy and opencv were indeed the conflicted packages. Apperently my version of opencv was using numpy 1.10, so I uninstalled opencv, updated numpy and updated scikit to 0.18. Thank's for the fast help! Best regards, Piotr On 11.10.2016 14:39, Maciek Wójcikowski wrote: Hi Piotr, I've been there - most probably some package is blocking you to update via numpy dependency. Try to update numpy first and the conflicting package should pop up: "conda update numpy=1.11" ---- Pozdrawiam, | Best regards, Maciek Wójcikowski maciek@wojcikowski.pl<mailto:maciek@wojcikowski.pl> 2016-10-11 14:32 GMT+02:00 Piotr Bialecki <piotr.bialecki@hotmail.de<mailto:piotr.bialecki@hotmail.de>>: Congratulations to all contributors! I would like to update to the new version using conda, but apparently it is not available: ~$ conda update scikit-learn Fetching package metadata ....... Solving package specifications: .......... # All requested packages already installed. # packages in environment at /home/pbialecki/anaconda2: # scikit-learn 0.17.1 np110py27_2 Should I reinstall scikit? Best regards, Piotr On 03.10.2016 18:23, Raghav R V wrote: Hi Brown, Thanks for the email. There is a working PR here at https://github.com/scikit-learn/scikit-learn/pull/7388 Would you be kind to take a look at it and comment how helpful the proposed API is for your use case? Thanks On Mon, Oct 3, 2016 at 6:05 AM, Brown J.B. <jbbrown@kuhp.kyoto-u.ac.jp<mailto:jbbrown@kuhp.kyoto-u.ac.jp>> wrote: Hello community, Congratulations on the release of 0.19 ! While I'm merely a casual user and wish I could contribute more often, I thank everyone for their time and efforts! 2016-10-01 1:58 GMT+09:00 Andreas Mueller <t3kcit@gmail.com<mailto:t3kcit@gmail.com>>: We've got a lot in the works already for 0.19. * multiple metrics for cross validation (#7388 et al.) I've done something like this in my internal model building and selection libraries. My solution has been to have -each metric object be able to explain a "distance from optimal" -a metric collection object, which can be built by either explicit instantiation or calculation using data -a pareto curve calculation object -a ranker for the points on the pareto curve, with the ability to select the N-best points. While there are certainly smarter interfaces and implementations, here is an example of one of my doctests that may help get this PR started. My apologies that my old docstring argument notation doesn't match the commonly used standards. Hope this helps, J.B. Brown Kyoto University 26 class TrialRanker(object): 27 """An object for handling the generic mechanism of selecting optimal 28 trials from a colletion of trials.""" 43 def SelectBest(self, metricSets, paretoAlg, 44 preProcessor=None): 45 """Select the best [metricSets] by using the 46 [paretoAlg] pareto selection object. Note that it is actually 47 the [paretoAlg] that specifies how many optimal [metricSets] to 48 select. 49 50 Data may be pre-processed into a form necessary for the [paretoAlg] 51 by using the [preProcessor] that is a MetricSetConverter. 52 53 Return: an EvaluatedMetricSet if [paretoAlg] selects only one 54 metric set, otherwise a list of EvaluatedMetricSet objects. 55 56 >>> from pareto.paretoDecorators import MinNormSelector 57 >>> from pareto import OriginBasePareto 58 >>> pAlg = MinNormSelector(OriginBasePareto()) 59 60 >>> from metrics.TwoClassMetrics import Accuracy, Sensitivity 61 >>> from metrics.metricSet import EvaluatedMetricSet 62 >>> met1 = EvaluatedMetricSet.BuildByExplicitValue( 63 ... [(Accuracy, 0.7), (Sensitivity, 0.9)]) 64 >>> met1.SetTitle("Example1") 65 >>> met1.associatedData = range(5) # property set/get 66 >>> met2 = EvaluatedMetricSet.BuildByExplicitValue( 67 ... [(Accuracy, 0.8), (Sensitivity, 0.6)]) 68 >>> met2.SetTitle("Example2") 69 >>> met2.SetAssociatedData("abcdef") # explicit method call 70 >>> met3 = EvaluatedMetricSet.BuildByExplicitValue( 71 ... [(Accuracy, 0.5), (Sensitivity, 0.5)]) 72 >>> met3.SetTitle("Example3") 73 >>> met3.associatedData = float 74 75 >>> from metrics.metricSet.converters import OptDistConverter 76 77 >>> ranker = TrialRanker() # pAlg selects met1 78 >>> best = ranker.SelectBest((met1,met2,met3), 79 ... pAlg, OptDistConverter()) 80 >>> best.VerboseDescription(True) 81 >>> str(best) 82 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 83 >>> best.associatedData 84 [0, 1, 2, 3, 4] 85 86 >>> pAlg = MinNormSelector(OriginBasePareto(), nSelect=2) 87 >>> best = ranker.SelectBest((met1,met2,met3), 88 ... pAlg, OptDistConverter()) 89 >>> for metSet in best: 90 ... metSet.VerboseDescription(True) 91 ... str(metSet) 92 ... str(metSet.associatedData) 93 'Example1: 2 metrics; Accuracy=0.700; Sensitivity=0.900' 94 '[0, 1, 2, 3, 4]' 95 'Example2: 2 metrics; Accuracy=0.800; Sensitivity=0.600' 96 'abcdef' 97 98 >>> from metrics.TwoClassMetrics import PositivePredictiveValue 99 >>> met4 = EvaluatedMetricSet.BuildByExplicitValue( 100 ... [(Accuracy, 0.7), (PositivePredictiveValue, 0.5)]) 101 >>> best = ranker.SelectBest((met1,met2,met3,met4), 102 ... pAlg, OptDistConverter()) 103 Traceback (most recent call last): 104 ... 105 ValueError: Metric sets contain differing Metrics. _______________________________________________ scikit-learn mailing list scikit-learn@python.org<mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn _______________________________________________ scikit-learn mailing list scikit-learn@python.org<mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn _______________________________________________ scikit-learn mailing list scikit-learn@python.org<mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn _______________________________________________ scikit-learn mailing list scikit-learn@python.org<mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn
Congrats ! Bertrand On 29/09/2016 07:28, Gael Varoquaux wrote:
Hurray!
Congratulations to everybody, and in particular the release time!
Gaël
On Wed, Sep 28, 2016 at 05:01:45PM -0400, Andreas Mueller wrote:
Hi everybody. I'm happy to announce scikit-learn 0.18 has been released today. You can install from pipy or anaconda.org: pip install --upgrade scikit-learn --no-deps
or if you prefer conda: conda update scikit-learn
A big thank you to everybody who contributed. This one took us a while, but I think it's worth the wait. Highlights include: - A new GaussianProcessClassifier and GaussianProcessRegressor to learn complex kernels! - A much improved GaussianMixture and BayesianGaussianMixture mixture models. - We moved the content of the grid_search, cross_validation and validation_curve modules to the new model_selection module. - A Multi-layer perceptron. and soo much more that it's impossible to summarize. Check out the full changelog here: http://scikit-learn.org/stable/whats_new.html#version-0-18 Please don't update a (ana)conda installation using pip, as that might lead to problems. Let us know any issues you have on the issue tracker: https://github.com/scikit-learn/scikit-learn/issues Enjoy! Andy _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
Congrats everyone! 2016-09-29 8:39 GMT+02:00 bthirion <bertrand.thirion@inria.fr>:
Congrats !
Bertrand
On 29/09/2016 07:28, Gael Varoquaux wrote:
Hurray!
Congratulations to everybody, and in particular the release time!
Gaël
On Wed, Sep 28, 2016 at 05:01:45PM -0400, Andreas Mueller wrote:
Hi everybody. I'm happy to announce scikit-learn 0.18 has been released today. You can install from pipy or anaconda.org: pip install --upgrade scikit-learn --no-deps
or if you prefer conda:
conda update scikit-learn
A big thank you to everybody who contributed.
This one took us a while, but I think it's worth the wait. Highlights include: - A new GaussianProcessClassifier and GaussianProcessRegressor to learn complex kernels! - A much improved GaussianMixture and BayesianGaussianMixture mixture models. - We moved the content of the grid_search, cross_validation and validation_curve modules to the new model_selection module. - A Multi-layer perceptron. and soo much more that it's impossible to summarize. Check out the full changelog here: http://scikit-learn.org/stable/whats_new.html#version-0-18 Please don't update a (ana)conda installation using pip, as that might lead to problems. Let us know any issues you have on the issue tracker: https://github.com/scikit-learn/scikit-learn/issues Enjoy! Andy _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
Congrats everyone :) On 29 Sep 2016 9:41 a.m., "Jaques Grobler" <jaquesgrobler@gmail.com> wrote:
Congrats everyone!
2016-09-29 8:39 GMT+02:00 bthirion <bertrand.thirion@inria.fr>:
Congrats !
Bertrand
On 29/09/2016 07:28, Gael Varoquaux wrote:
Hurray!
Congratulations to everybody, and in particular the release time!
Gaël
On Wed, Sep 28, 2016 at 05:01:45PM -0400, Andreas Mueller wrote:
Hi everybody. I'm happy to announce scikit-learn 0.18 has been released today. You can install from pipy or anaconda.org: pip install --upgrade scikit-learn --no-deps
or if you prefer conda:
conda update scikit-learn
A big thank you to everybody who contributed.
This one took us a while, but I think it's worth the wait. Highlights include: - A new GaussianProcessClassifier and GaussianProcessRegressor to learn complex kernels! - A much improved GaussianMixture and BayesianGaussianMixture mixture models. - We moved the content of the grid_search, cross_validation and validation_curve modules to the new model_selection module. - A Multi-layer perceptron. and soo much more that it's impossible to summarize. Check out the full changelog here: http://scikit-learn.org/stable/whats_new.html#version-0-18 Please don't update a (ana)conda installation using pip, as that might lead to problems. Let us know any issues you have on the issue tracker: https://github.com/scikit-learn/scikit-learn/issues Enjoy! Andy _______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
An important addition to the release notes that I forgot: The 0.18 release is the last scikit-learn release to support Python 2.6 From 0.19 on, we will only support 2.7 and 3.4 and up. On 09/28/2016 05:01 PM, Andreas Mueller wrote:
Hi everybody.
I'm happy to announce scikit-learn 0.18 has been released today. You can install from pipy or anaconda.org:
pip install --upgrade scikit-learn --no-deps
or if you prefer conda:
conda update scikit-learn
A big thank you to everybody who contributed. This one took us a while, but I think it's worth the wait.
Highlights include: - A new GaussianProcessClassifier and GaussianProcessRegressor to learn complex kernels! - A much improved GaussianMixture and BayesianGaussianMixture mixture models. - We moved the content of the grid_search, cross_validation and validation_curve modules to the new model_selection module. - A Multi-layer perceptron.
and soo much more that it's impossible to summarize. Check out the full changelog here:
http://scikit-learn.org/stable/whats_new.html#version-0-18
Please don't update a (ana)conda installation using pip, as that might lead to problems. Let us know any issues you have on the issue tracker: https://github.com/scikit-learn/scikit-learn/issues
Enjoy!
Andy
participants (10)
-
Andreas Mueller -
Brown J.B. -
bthirion -
Gael Varoquaux -
Jaques Grobler -
Joel Nothman -
Maciek Wójcikowski -
Piotr Bialecki -
Raghav R V -
Sebastian Raschka