Code Monkey home page Code Monkey logo

em_for_gmm_from_scratch's Introduction

EM Algorithm for Gaussian Mixture Model (GMM)

This project implements the Expectation-Maximization (EM) algorithm for Gaussian Mixture Model (GMM) from scratch in Python. The aim is to provide a deeper understanding of the EM algorithm and its application in clustering via GMM. Additionally, the performance of the custom implementation is compared against the inbuilt functions of the scikit-learn library.

Table of Contents

Introduction

The Gaussian Mixture Model (GMM) is a probabilistic model that represents the presence of subpopulations within an overall population. The EM algorithm is an iterative method for finding maximum likelihood estimates of parameters in statistical models, where the model depends on unobserved latent variables. In this project, we delve into implementing the EM algorithm specifically for GMM from scratch in Python.

Usage

To use this implementation, simply clone the repository:

git clone https://github.com/abdulsamad183/EM_for_GMM_from_scratch.git

Dependencies

  • Python 3.x
  • NumPy
  • scikit-learn

Dataset

The Iris dataset is used for training the GMM and comparing performance. It is a classic dataset widely used for classification and clustering tasks. The dataset consists of 150 samples with 4 features each, representing 3 classes of iris plants.

Custom Implementation

The custom implementation of the EM algorithm for GMM is located in the .ipynb file. It includes functions for initializing parameters, calculating the expectation step, the maximization step, and iterating until convergence.

Performance Comparison

The performance of the custom implementation is compared with the inbuilt functions provided by the scikit-learn library. The comparison includes metrics such as convergence rate, and clustering accuracy.

em_for_gmm_from_scratch's People

Contributors

abdulsamad183 avatar

Watchers

 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.