Multinomial Naive Bayes Code on Amazon Data set || Lesson 53 || Machine Learning || Learning Monkey

preview_player
Показать описание
#machinelearning#learningmonkey

In this class, we discuss the Multinomial Naive Bayes Code on the Amazon Data set.
For a better understanding of the code. we must have prior knowledge of Naive Bayes.

We use a multinomial Naive Bayes Class on the Amazon Mobile data set. because of text classification.

we convert the data to Bag of words and apply multinomial naive Bayes.

We convert the data to TFIDF and apply Multinomial Naive Bayes.

We do upsample on amazon data set and apply multinomial Naive Bayes.

ROC_AUC implementation was clearly coded in this class.

How to identify the best threshold value and generating confusion matrix code in python.

we use seaborn to display the confusion matrix.

 Link for playlists:

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

Hello sir,

In the case of imbalances dataset(Churn Modeling from Kaggle) even after upsampling also the accuracy is not improving is there any reason?
I had tried checking whether the features are dependent but they are independent (which is the assumption of Naive Bayes)?
Can you please help with this ?

harshavardhanachyuta
Автор

In line 33, why have you mentioned "1" in code : range(0, len(k), 1): ? Param alphas have values 0.0001, 0.001 but taking step values as 1 will not cover the param alpha values right?

soumyabanerjee
Автор

In line 13, why are you calculating roc_curve over training data ? After fitting the model with multinomialnb with trainin data, will y_train_pred and outputtrain have 100 percent same values?

soumyabanerjee
Автор

Sir, the code throws error.
clf = GridSearchCV(neigh, tuned_parameters, cv=5, scoring='roc_auc', return_train_score='true')
clf.fit(train_cleanedtext, outputtrain)

InvalidParameterError: The 'return_train_score' parameter of GridSearchCV must be an instance of 'bool' or an instance of 'numpy.bool_'. Got 'true' instead.

manojpandya
Автор

For different values of alpha how do we calculate training accuracy?
Normally we fit the line using training data and base on actual and predicted value we calculate training accuracy for model.
In Naive bayes we do not fit a line or something like that then how to we compare actual and predicted results to find training accuracy?

tusharsalunkhe
Автор

Can we get the codes in Kaggle? If you have account on Kaggle can you please share your id? I don't know, each time the mediafire links are not opening!

SakibSourav
welcome to shbcf.ru