๐ฐ Fake News Detector (Professional Pipeline)
ูุฐุง ูู ูุฐุฌ Scikit-learn Pipeline ุชู ุชุฏุฑูุจู ูุชุตููู ุงูู ูุงูุงุช ุงูุฅุฎุจุงุฑูุฉ ุฅูู "ุญููููุฉ (True)" ุฃู "ูุงุฐุจุฉ (Fake)".
๐ ููู ูุนู ูุ
ูุณุชุฎุฏู
ุงููู
ูุฐุฌ Pipeline ุงุญุชุฑุงูู ูุฏู
ุฌ ุฎุทูุชูู ูู ุฎุทูุฉ ูุงุญุฏุฉ:
- TF-IDF Vectorizer: ูุชุญููู ุงููุต ุฅูู ู ุตูููุฉ ุฑูู ูุฉ.
- Logistic Regression: ูุนู ููุฉ ุงูุชุตููู.
๐ ุฃุฏุงุก ุงููู ูุฐุฌ
ุญูู ุงููู
ูุฐุฌ ุฏูุฉ 96.50% ุนูู ู
ุฌู
ูุนุฉ ุงูุงุฎุชุจุงุฑ.

๐ ๏ธ ููููุฉ ุงูุงุณุชุฎุฏุงู (ูู Python)
ุจูุถู ุงูู Pipelineุ ุฃุตุจุญ ุงูุงุณุชุฎุฏุงู ุจุณูุทุงู ุฌุฏุงู:
import skops.io as sio
# ุชุญู
ูู ู
ูู ุงูู Pipeline ุงููุงุญุฏ
pipeline = sio.load("fake_news_pipeline.skops", trusted=True)
# ูุต ููุชุฌุฑุจุฉ
text_to_test = "Your sample news text goes here..."
# ุงูุชูุจุค ู
ุจุงุดุฑุฉ (ุงูู Pipeline ูุชููู ุงูุชุญููู ูุงูุชูุจุค)
prediction_label = pipeline.predict([text_to_test])[0]
probabilities = pipeline.predict_proba([text_to_test])[0]
label = "True" if prediction_label == 1 else "Fake"
confidence = probabilities[prediction_label]
print(f"Prediction: {label}")
print(f"Confidence: {confidence:.2f}")
- Downloads last month
- -