Exercises and assignments from a machine learning course in my fourth semester. It goes from linear regression all the way to neural networks, unsupervised learning and genetic algorithms, mostly using scikit-learn, NumPy, pandas and matplotlib.
| Folder | Topic |
|---|---|
Lektion01 |
Python warm-up exercises |
Lektion02 |
Linear regression, including polynomial features and 3D plots |
Lektion03 |
Genetic algorithms: cannonball trajectory, flight scheduling, healthcare scheduling |
Lektion04 |
Logistic regression and classification metrics (precision/recall on the Iris dataset) |
Lektion05 |
Data exploration and simulation: Chicago crime data, world population, SIR infection model, Snake |
Lektion06 |
Decision trees, random forests, SVMs and k-means (incl. the moons dataset) |
Lektion07 |
SVM on breast-cancer data, plus a small pygame tic-tac-toe game |
Lektion08 |
Multi-layer perceptrons, diabetes dataset |
Lektion09 |
MLP on the moons dataset, Titanic survival prediction |
Lektion10 |
MNIST digits, k-means and PCA on Iris |
Lektion11 |
Travelling salesman problem with a genetic algorithm (1000 cities) |
Lektion12 |
Predicting Pokémon type from stats with a random forest |
Mandatory_Assignment |
Graded assignments: neural nets on moons/circles, Titanic survival, face recognition with PCA + SVM |
Files named *_Min_Løsning.py ("my solution") are my own answers to the assignment snippets.
Python 3 · scikit-learn · NumPy · pandas · matplotlib · pygame
pip install scikit-learn numpy pandas matplotlib pygame
cd Lektion06
python decisiontree.pyScripts read their datasets (CSV/TXT) from their own folder, so run them from inside that folder.