Naive Bayes
📘 সম্ভাবনাভিত্তিক ক্লাসিফায়ার।
🌐 Probabilistic classifier.
🎯
1
ধারণা · Concept
কী এবং কেন📘 বাংলা ব্যাখ্যা:
সম্ভাবনাভিত্তিক ক্লাসিফায়ার।
সম্ভাবনাভিত্তিক ক্লাসিফায়ার।
🌐 English:
Probabilistic classifier.
Probabilistic classifier.
🗂 কোথায় পড়ে
৩. মেশিন লার্নিং → সুপারভাইজড লার্নিং → Naive Bayes
🎯 এই শাখার লক্ষ্য
Train, compare and choose regression/classification models
🧰 টুলস
scikit-learn, XGBoost
🪜
ধাপে ধাপে শিখুন · Step-by-step
কেন শিখবেন → কীভাবে শিখবেন → উদাহরণ → সাধারণ ভুল💡 কেন গুরুত্বপূর্ণ?
টেক্সট ক্লাসিফিকেশনে দ্রুত, কম ডেটায়ও ভালো বেসলাইন।
- ধাপ 1বেইজ থিওরেম: P(ক্লাস|ফিচার) ∝ P(ফিচার|ক্লাস)·P(ক্লাস)
- ধাপ 2"Naive" অনুমান: ক্লাস জানা থাকলে ফিচারগুলো স্বাধীন
- ধাপ 3ধরন: GaussianNB (সংখ্যা), MultinomialNB (শব্দ গণনা), BernoulliNB (হ্যাঁ/না)
- ধাপ 4শূন্য সম্ভাবনা এড়াতে Laplace smoothing (alpha=1)
🧪 বাস্তব উদাহরণ
TF-IDF + MultinomialNB দিয়ে বাংলা সংবাদ শিরোনাম খেলা/রাজনীতি/বিনোদনে ভাগ।
⚠️ সাধারণ ভুল
predict_proba-কে বাস্তব সম্ভাবনা ভাবা—NB-র সম্ভাবনা প্রায়ই অতি-আত্মবিশ্বাসী।
🔑 মূল শব্দ (Key terms)
Naive Bayesconditional independenceLaplace smoothingMultinomialNB
3
সাব-টপিক ও বিস্তারিত · Sub-topics
টপিক → সাব-টপিক → সাব-সাব টপিক6.1 বেইজ থিওরেম প্রয়োগ
6.2 "Naive" স্বাধীনতা অনুমান
6.3 ধরন6.3.1 Gaussian6.3.2 Multinomial (টেক্সট)
🎬
ভিডিও · Videos (বাংলা ও English)
ক্লিক করলে সাইটের ভেতরেই ফ্লোটিং প্লেয়ারে চলবে · ভিডিও MySQL-এ সংরক্ষিত📺 আরও খুঁজুন
💻
হাতে-কলমে · Try it (Supervised Learning)
এডিট করে Run চাপুন · Ctrl+Enterfrom sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
from sklearn.neighbors import KNeighborsClassifier
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
X,y=load_breast_cancer(return_X_y=True); Xtr,Xte,ytr,yte=train_test_split(X,y,random_state=1)
for n,m in {"LogReg":make_pipeline(StandardScaler(),LogisticRegression(max_iter=500)),"KNN":make_pipeline(StandardScaler(),KNeighborsClassifier()),
"RandomForest":RandomForestClassifier(random_state=0),"GradBoost":GradientBoostingClassifier()}.items():
print(f"{n:13s} accuracy = {m.fit(Xtr,ytr).score(Xte,yte):.3f}")❓
সেল্ফ-চেক · Self check
1. “Gaussian, Multinomial (টেক্সট)” — এটি কোন সাব-টপিকের বর্ণনা?
🔗
সংযুক্ত কনসেপ্ট · Connected concepts
এই শাখার অন্যান্য অংশ
1. Linear Regression2. Polynomial Regression3. Ridge Lasso Regularization4. Logistic Regression5. KNN6. Naive Bayes7. Decision Tree8. Random Forest9. SVM10. Gradient Boosting XGBoost11. LightGBM CatBoost