Classifiers and Regression
Explore the repository»
View Problem Statement
View Report
tags : linear regression, logistic regression, scikit-learn, one vs rest classifier, iris dataset, German data
This repository holds the python implementation files for Assignment #2 for E1 213 Pattern Recognition and Neural Networks offered at the Indian Institute of Science (IISc), Bangalore. In this assignment we will explore linear models and compare different methods of learning linear classifiers and regression functions. The following methods have been implemented across the problems.
- Linear regression
- Logistic regression
- One vs Rest classification
- One hot classification
Problem 1 deals with implementing and evaluating linear and logistic regressions with synthetic data drawn from Gamma, Uniform and Normal distributions. Problem 2 deals with classification using the Iris dataset with three 2-class classifiers using ‘one vs rest’ strategy and with a 3-class linear classifier (by taking the target variable as a 3-dimensional one-hot vector). Problems 3 deals with classification using German credit data using linear least squares and logistic regression. Problem 4 deals with an 1D regression with polynomial fitting.
This project was built with
- python v3.7
- The list of libraries used for developing this project is available at requirements.txt.
Clone the repository into a local machine using
git clone https://github.com/vineeths96/Linear-classifiers-and-Regression
Please install required libraries by running the following command (preferably within a virtual environment).
pip install -r requirements.txt
There are four python files - problem_1.py
, problem_2.py
, problem_3.py
, and problem_4.py
- each corresponding to the particular problem in the Problem Statement. Each problem has their corresponding implementation files under a python package with the same name. Each package has python modules and functions to load data, train a model, test it, and write the performance metrics to an output file at ./results
with the same file name.
python problem_<QUES_NUM>.py
View Report for the results and detailed discussions.
Distributed under the MIT License. See LICENSE
for more information.
Vineeth S - vs96codes@gmail.com
Project Link: https://github.com/vineeths96/Linear-classifiers-and-Regression