Skip to content

In this repository, we will explore linear models and compare different methods of learning linear classifiers and regression functions.

License

Notifications You must be signed in to change notification settings

vineeths96/Linear-classifiers-and-Regression

Repository files navigation

Language Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Pattern Recognition and Neural Networks

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

About The Repository

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.

Built With

This project was built with

  • python v3.7
  • The list of libraries used for developing this project is available at requirements.txt.

Getting Started

Clone the repository into a local machine using

git clone https://github.com/vineeths96/Linear-classifiers-and-Regression

Prerequisites

Please install required libraries by running the following command (preferably within a virtual environment).

pip install -r requirements.txt

Instructions to run

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.

Running the program
python problem_<QUES_NUM>.py

Results

View Report for the results and detailed discussions.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Vineeth S - vs96codes@gmail.com

Project Link: https://github.com/vineeths96/Linear-classifiers-and-Regression

About

In this repository, we will explore linear models and compare different methods of learning linear classifiers and regression functions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages