Five single-feature regression exercises, two classification tasks and a small BERT training example. The bundled CSVs let you reproduce the tabular exercises offline.
Install requirements.txt in a Python 3.12 virtual environment. Each regression script loads its own CSV, plots the observations, fits a line and prompts for an input. Example:
python "Linear regression/Marks predictor.py"For the stock examples, the final 20% of dates form the evaluation split. The model fits price against date alone. For a batch run, set MPLBACKEND=Agg and pipe an input value to the chosen script.
cd Classification
waitress-serve --listen=127.0.0.1:8080 heart_disease_predictor:appOpen http://127.0.0.1:8080. The KNN pipeline fits imputation and scaling only on the training split. The form returns the predicted TenYearCHD dataset label. The CLI version also prints precision and recall. These coursework classifiers have no clinical validation. The text SVM predicts a medicine label from the training dataset and cannot establish an appropriate treatment.
The standalone test.py is a four-example fine-tuning demonstration. It requires PyTorch, Transformers 4.x and Accelerate. It downloads bert-base-uncased on the first run, or accepts a compatible local checkpoint via MODEL_PATH. Four training texts are sufficient to check the training loop but cannot establish sentiment-classification quality.