Skip to content

Want to instantly identify what an article(finance) is about? If yes, then this model is for you!

License

Notifications You must be signed in to change notification settings

Redmonkeycloud/Article-Categorizer-Supermodel

Repository files navigation

Want to instantly categorize financial articles?

If yes, then this model is for you!

What does this ML model do?

This script trains Naive Bayes, SVM, and Random Forest classifiers on the same dataset of articles, and then uses a voting classifier to combine their predictions and make the final prediction. The voting classifier uses the "soft" voting strategy, which means it predicts the class with the highest average probability across all the individual classifiers.

You can modify this script to use different machine learning algorithms, or add more classifiers to the voting classifier to improve its accuracy.

Why try it ?

  • Learn how to create & combine different classifier models.
  • Basic preprocessing for text inputs.
  • Familiarize with saving & reusing trained ML models.

High level overview

This diagram shows the main steps of the script, starting with the input data (articles), followed by data preprocessing, machine learning algorithms, and a voting classifier that combines the predictions of the three classifiers (Naive Bayes, SVM, and Random Forest) to make the final prediction of the article's category. The predicted categories are the output of the script.

+-----------------------+
|                       |
|  Input Data (Articles)|              
|                       |
+-----------+-----------+
            |
            |
            v
+-----------+-----------+
|                       |
|    Data Preprocessing |              
|                       |
+-----------+-----------+
            |
            |
            v
+-----------+-----------+
|                       |
|     Machine Learning  |              
|       Algorithms      |
|                       |
+-----------+-----------+
            |
            |
            v
+-----------+-----------+
|                       |
|  Voting Classifier    |              
|                       |
+-----------+-----------+
            |
            |
            v
+-----------+-----------+
|                       |
|  Predicted Categories |              
|                       |
+-----------------------+

Install required dependencies, with pip.

pandas==1.2.4
scikit-learn==0.24.2
numpy==1.20.2

Run the Supermodel core.

python Supermodel_core.py

Run the application.

python Supermodel.py 

Inspiration drawn:

https://www.youtube.com/watch?v=i6qL3NqFjs4

About

Want to instantly identify what an article(finance) is about? If yes, then this model is for you!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages