Purpose of fit method in sklearn module in python

0 votes
I am new to machine learning. I am a bit confused about the function of fit module in scikit-learn.

can you tell me why it is used in sklearn?
Jul 5, 2019 in Python by Waseem
• 4,540 points

edited Jun 25, 2020 by MD 3,154 views

1 answer to this question.

0 votes
it basically trains your model using the dataset u provided.
answered May 14, 2020 by Mahesh
• 140 points
In which sense does it train?What difference does it make to our dataset can you explain vividly?

Hi@Ruchika,

Say you have one dataset as given below.

experience                 salary
 1                         10000
 2                         20000  
 3                         30000

When you fit these data into your model, it will take an experience from your dataset and internally it will find some parameters like bias and weights. Now if you give some new data to your model, say if someone has experience 2.5, how much salary he/she will get. That time your model automatically finds the salary using the bias and weights.

Related Questions In Python

0 votes
1 answer

What is the purpose of inner class in Python?

Advantages of inner class: Logical grouping of classes: ...READ MORE

answered Feb 7, 2019 in Python by SDeb
• 13,300 points
1,995 views
0 votes
1 answer

.join() method is used for what purpose in Python?

join() method is used to concatenate or ...READ MORE

answered May 14, 2019 in Python by Taj
• 1,080 points
901 views
0 votes
1 answer

What is the purpose of using lambda functions in Python?

The main purpose of anonymous functions come ...READ MORE

answered Jun 11, 2019 in Python by Nisa
• 1,090 points
1,427 views
0 votes
1 answer

What is the purpose of hash function in python?

The hash() method returns the hash value of an object if it ...READ MORE

answered Aug 2, 2019 in Python by Mohammad
• 3,230 points
689 views
0 votes
1 answer

What is the purpose of else part in python exception handling?

When an error occurs, or exception as ...READ MORE

answered Aug 23, 2019 in Python by Arvind
• 3,040 points
1,761 views
0 votes
1 answer

What is the purpose of ​#!/usr/bin/python​on the first line in the above code?

Hey, @Roshni, By specifying #!/usr/bin/python you specify exactly ...READ MORE

answered Jun 23, 2020 in Python by Gitika
• 65,910 points
10,359 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,058 views
0 votes
1 answer
0 votes
1 answer

How to compare expected and predicted values?

The predict() function returns a plain numpy ...READ MORE

answered Jul 14, 2019 in Machine Learning by Tina
12,521 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP