Giter Site home page Giter Site logo

clusters_classifiers's Introduction

Clusters and Classifiers

This repository contains the source code for cluster generation and classification of five classes with bivariate Gaussian distribution parameters. Classification was implemented using MED, GED, MAP, NN, and kNN classifiers. Error analysis was conducted by determining the experimental error rate and confusion matrix for each classifier.

MED, GED and MAP classifiers NN and kNN classifiers

Cluster Generation

Normal distributions for the following classes were created using numpy.random.multivariate_normal. Distribution plotting was implemented with plot and scatter from matplotlib.pyplot, and standard deviation contours for each class were plotted using contour from the same module. Code: data_class.py

Class A: NA = 200, μA = [5 10]T, ΣA = [ [8 0], [0 4] ]
Class B: NB = 200, μB = [10 15]T, ΣB = [ [8 0], [0 4] ]

Class C: NC = 100, μC = [5 10]T, ΣC = [ [8 4], [4 40] ]
Class D: ND = 200, μD = [15 10]T, ΣD = [ [8 0], [0 8] ]
Class E: NE = 150, μD = [10 5]T, ΣE = [ [10 -5], [-5 20] ]

Classifiers

The following classifiers were implemented:

  1. Minimum Euclidean Distance (MED)
  2. Generalized Euclidean Distance (GED)
  3. Maximum A Posterioi (MAP)
  4. Nearest Neighbor (NN)
  5. k-Nearest Neighbor (kNN) with k = 5

To classify, a 2D grid was created, each point was classified, and a contour plot was generated. Code: classifiers.py

Error Analysis

Following classification, the experimental error rate and confusion matrices were determined for each classifier. This was implemented using accuracy_score and confusion_matrix from sklearn.metrics. Code: error_calculation.py

clusters_classifiers's People

Contributors

abeljoseph avatar furqansyed avatar sthusoo avatar hamzanadeveloper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.