Welcome to my repository of Machine Learning assignments completed as part of the coursework at Maastricht University for the 2023-24 academic year. This collection covers various fundamental topics in machine learning, including Decision Trees, Nearest Neighbors, Clustering, and Linear Regression Models. Below you will find an overview of each assignment, along with instructions on how to run the code and interpret the results.
- Assignment 1: Decision Trees
- Assignment 2: Nearest Neighbors
- Assignment 3: Clustering
- Assignment 4: Linear Regression Models
- Results and Reports
- References
In this assignment, we explored Decision Trees as a method for both classification and regression tasks. The primary objectives were:
- Understanding the theory behind Decision Trees.
- Implementing Decision Trees using scikit-learn.
- Evaluating model performance through metrics like accuracy, Gini impurity, and mean squared error.
Decision-Trees.ipynb
: Contains the code for training and evaluating Decision Trees for different tasks.
This assignment focused on the k-Nearest Neighbors (k-NN) algorithm, a simple yet effective technique for classification and regression. Key learning outcomes included:
- Understanding the working of the k-NN algorithm.
- Implementing k-NN for classification tasks and analyzing its performance.
- Experimenting with different values of k and distance metrics to see their effects on model performance.
Nearest-Neighbors.ipynb
: Script for implementing and evaluating the k-NN algorithm.
This assignment introduced clustering techniques, focusing on K-means and hierarchical clustering. The key learning outcomes were:
- Understanding the concept and applications of clustering.
- Implementing K-means and hierarchical clustering algorithms.
- Evaluating clustering results using metrics such as silhouette score and inertia.
Clustering.ipynb
: Contains the implementation of K-means and hierarchical clustering with evaluation.
In the final assignment, we explored Linear Regression models for predictive analysis. The objectives were:
- Understanding the principles of linear regression.
- Implementing linear regression models for both simple and multiple regression tasks.
- Evaluating model performance using metrics like R-squared and Mean Squared Error (MSE).
Linear-Regression.ipynb
: Script for building and evaluating linear regression models.
Detailed analysis, results, and discussions are included in the respective Jupyter notebooks for each assignment. Additionally, there are comprehensive reports accompanying each assignment, providing in-depth explanations, methodologies, and interpretations of the results obtained from the models.
Feel free to explore the code, use it as a reference for your own projects, and provide feedback or suggestions for improvement.