dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9.03k stars 1.89k forks source link

Porting algorithm - Multinomial NB #3844

Open writetokavitha opened 5 years ago

writetokavitha commented 5 years ago

@codemzs Not finding multinomial NB as part of the ML.Net algorithms which we use for intent detection.

From nb sci kit learn libraries: https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.MultinomialNB.html

clfnb = Pipeline([('vect', CountVectorizer(tokenizer=None, lowercase=True, stop_words=None, ngram_range=(1,2))), ('tfidf', TfidfTransformer(use_idf = True)), ('clf', MultinomialNB()),]) clfnb.fit(df_train, df_label)

yaeldekel commented 5 years ago

Hi @writetokavitha, Thank you for raising this issue. ML.NET has a multi-class Naive Bayes trainer, but it only trains on binary feature values. I will label this feature request as an enhancement, and we will prioritize this feature.