fit vs transform vs fit_transform | fit vs fit_transform | fit and fit_transofrm in sklearn

preview_player
Показать описание
fit vs transform vs fit_transform | fit vs fit_transform | fit and fit_transofrm in sklearn
#machinelearning #datascience #unfolddatascience
Hello ,
My name is Aman and I am a Data Scientist.

Topics for the video:
fit transform fit transform
fit vs fit_transform
fit and fit_transform in sklearn
fit vs fit transform sklearn
fit vs transform vs fit_tranform
fit vs transform vs fit tranform

About Unfold Data science: This channel is to help people understand basics of data science through simple examples in easy way. Anybody without having prior knowledge of computer programming or statistics or machine learning and artificial intelligence can get an understanding of data science at high level through this channel. The videos uploaded will not be very technical in nature and hence it can be easily grasped by viewers from different background as well.

Book recommendation for Data Science:

Category 1 - Must Read For Every Data Scientist:

Ctaegory 2 - Overall Data Science:

Category 3 - Statistics and Mathematics:

Category 4 - Machine Learning:

Category 5 - Programming:

My Studio Setup:

Join Facebook group :

Follow on twitter : @unfoldds

Follow on Instagram : unfolddatascience

Watch python for data science playlist here:

Watch statistics and mathematics playlist here :

Watch End to End Implementation of a simple machine learning model in Python here:

Learn Ensemble Model, Bagging and Boosting here:

Build Career in Data Science Playlist:

Artificial Neural Network and Deep Learning Playlist:

Natural langugae Processing playlist:

Understanding and building recommendation system:

Access all my codes here:

Рекомендации по теме
Комментарии
Автор

After 2 long years ....now i know the answer 😭....im grateful

mushinart
Автор

fit_tranform on x_train and tranform on x_test. Reason - by fit_transform we are learning the parameters and transforming the x_train and if we do again fit_transform on x_test it will learn the parameters again so will do only transform on x_test. and sara mazra overfitting ka hai . Hope this is making sense.

HimanshuKumar-oiqh
Автор

you are doing social work with such explanation sir. Thank you very much.

PreenitaBhattacharya
Автор

We can apply fit on training data so that we have parameter values with us. We can also use fit_transform on training data. It will calculate parameter values from training data and do transformation as well. But on testing data, we always use transform and use the parameter values from training data. This will lead to data leakage problem. To avoid leakage problem we might use fit_transform on testing data. Correct me if I am wrong. And plz avoid this confusion by making a video Aman bhaiya...!!!!

shubhamagrawal
Автор

Hi Aman,
thanks for the video. my answer is below.
In the prediction stage we don't require scalar object because the model still understands the numeric data and we require scaling only if the dataset has multiple numeric features and if we want to compute distance between data points

In the prediction stage of tfidif vector, we should pass the vectorizer object because the vectorizer object helps in transforming the text to vector at evaluation stage before passing it to the model for prediction which is necessary.

Krishna-pnje
Автор

For prediction we should ideally use transform because the data is fitted on training data and the test data is transformed using that fitted object. This can be for both tfidf and the scaler object.

I could be wrong but this makes sense for me.

dakshbhatnagar
Автор

So is standardizing just finding the z score?

learning_with_irving
Автор

Thanks for taking my comments seriously

subhashdixit
Автор

Product manager vs Data scientists which 1 pays you well sir ?

niranjan.tanpure
Автор

This guy's teaching is really really amazing

rosemarydara
Автор

I don't think we will use both fit and transform function because while testing the dataset for our ml model we will not use testing dataset. we will use xtrain and ytrain dataset alone to feed for train our model in scaling.

iyyappanmuthusamy
Автор

I will use separated scaler because each scaler save the data for the specific column

ibrahimmosty
Автор

Bhai btana ha to puri chije clear btaya kro yr ye kya bhai tumne to hme hi confuse kr diya ki fit_transform use krege ya nhi test dataset me. video me reach chahiye to bol diya kro bhai hm sb comment kr dege lekin aisa confusion me fsake mt jaya kro. btana h to pura clear btao vrna rhne do

chandrabhanbahetwar
Автор

Hi,
For the prediction.. we will have to use only transform because we have trained the model and we want to use same parameters so we will only use transform.

For tfidf we will use fit_transform. Since the corpus is changing so we need to calculate the parameters and then apply so we will have to use fit_transform.

himalayaashish
Автор

Why create all this confusion, just make the video with the answers in it...

shrirajpathak