Sadaf Shafi
Sadaf Shafi

Reputation: 1438

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. 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. I saw the code of library of logistic regression but got nothing.

Any effort is appreciated.

Upvotes: 1

Views: 125

Answers (1)

Sadaf Shafi
Sadaf Shafi

Reputation: 1438

I got it. GridsearchCV is the answer, thats what I was looking for. 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. This article helped me to understand it well.

Upvotes: 1

Related Questions