Stock Sentiment Prediction
Six algorithms, one ensemble vote
Python · Django 3.2 · scikit-learn · TensorFlow · TF-IDF · NLTK
Raw text runs through a full NLP preprocessing pipeline — cleaning, tokenization, stop-word removal, lemmatization, then TF-IDF vectorisation with n-gram feature extraction — before being fed to six different classifiers: a deep neural network, SVM, logistic regression, decision tree, K-Neighbors and gradient boosting, combined through a voting ensemble.
K-Neighbors came out best at 93.29% accuracy with precision, recall and F1 all at 0.933. But the more useful observation is the narrowness of the field: only 3.6 percentage points separate the best model from the worst, and a KNN beating a deep network on the same features is a strong hint that the TF-IDF representation is carrying the signal and the classifier is close to irrelevant. The ensemble exists for robustness rather than for accuracy.