简体   繁体   English

sci-kit 学习库中算法的参数是如何优化的?

[英]How does optimization happen in the parameters of the algorithms in sci-kit learn library?

When Machine Learning is seen mathematically, we have cost functions, to reduce the error in the prediction for the next time and we keep on optimizing the parameters of the equation/s used in the particular algorithm.当从数学上看机器学习时,我们有成本函数,以减少下一次预测中的错误,我们不断优化特定算法中使用的方程的参数。

I wonder where does this optimization happen in the library Sci-kit learn .我想知道这个优化在库Sci-kit learn 中发生在哪里。 There is no function for doing this job, so far I know,there are rather a bunch of algorithms as functions .没有做这项工作的功能,到目前为止我知道,有相当多的算法作为功能

Can someone please tell me how do I optimize those parameters in sci-kit learn, and is there a way to do it in the mentioned library or is it just for learning purposes.有人可以告诉我如何在 sci-kit learn 中优化这些参数,有没有办法在提到的库中做到这一点,或者只是为了学习目的。 I saw the code of library of logistic regression but got nothing.我看到了逻辑回归库的代码,但一无所获。

Any effort is appreciated.任何努力都值得赞赏。

I got it.我知道了。 GridsearchCV is the answer, thats what I was looking for. GridsearchCV就是答案,这就是我一直在寻找的。 I think it allows us to choose the values of alpha, c and number of iterations, therefore, not allowing to alter the values of weights directly and I think thats ok or thats how we'd assign values to those parameters after carrying out the same process independtly.我认为它允许我们选择 alpha、c 和迭代次数的值,因此,不允许直接改变权重的值,我认为没关系,或者这就是我们在执行相同操作后为这些参数赋值的方式独立处理。 This article helped me to understand it well.这篇文章帮助我很好地理解了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM