Got it - thanks On Sun, Feb 24, 2019 at 4:54 AM Vlad Niculae <zephy...@gmail.com> wrote:
> Hi, > > The `classifier` object in your code _is_ the model. In other words, after > `fit`, the classifier object will have some new attributes (for instance > `classifier.coef_` in the case of linear models), which are used to make > predictions when you call `predict`. > > Hope this helps, > Vlad > > On Sun, Feb 24, 2019, 05:34 Venkataraman B <venkataraman....@gmail.com> > wrote: > >> Hi, I had a question on the predict and fit methods >> >> The fit method is used to build the model ie classifier.fit(X,y). But >> when the predict method is called the model that is built is never passed. >> You only pass the test set. So what model does the predict function use to >> predict the output >> >> I am picking python after working on R and the predict function in R made >> more sense because the model that was built is passed along with the test >> set that has to be predicted >> >> Any response would be greatly appreciated >> -- >> Regards, Venkataraman B >> > _______________________________________________ >> 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 > -- Regards, Venkataraman B
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn