Git Product home page Git Product logo

aashitadutta / percapitaviolentcrimesprediction Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 927 KB

Implementing Fuzzy Inference System using PerCapitaViolentCrimesPrediction dataset where Genetic Algorithm used for feature selection, and discretizing the data while encoding values to class variables. Generating Rules with Decision Tree Classifier, And fuzzifying values and rules inference system and defuzzification in MATLAB.

Jupyter Notebook 99.81% MATLAB 0.19%
matlab fuzzification decision-tree-classifier genetic-algorithm feature-selection discretization encoding rules-generator membership-functions accuracy-measure

percapitaviolentcrimesprediction's Introduction

Per Capita Violent Crimes Prediction

Per capita violent crimes prediction on the Communities and Crime Dataset from UCI Machine Learning.

  • Genetic Algorithm is used for feature selection.
  • Data is then descritized using pandas cut function into bins.
  • Decision trees are used for the rules generation.
  • Rules generated are used in the Fuzzy Inference System developed in matlab.
  • Accuracy is tested.

Team Members :

Feature Selection Using GA

An example implementation of a simple Genetic Algorithm applied to feature selection. It will be using the Communities and Crime Dataset from UCI Machine Learning, which has 128 attributes, aimining to use these attributes in order to predict the label (Per Capita Violent Crimes). We will use the Genetic Algorithm to select which of those 128 features are most relevant to this prediction.

Discretization

After features selected by genetic algorithm, continuous values are dicretized into range values using pandas cut function into bins and encoded into class variables.

Rules Generation

Generating Rules from Discretized+Encoded data optimized using Genetic Feature Selections. sklearn.tree.DecisionTreeClassifier¶ is used to generate rules in text format with distinct classes based on probability, number of samples and gini index to measure how impure the partitions are. image

Fuzzy Inference System

Rules along with data are fed into Fuzzy Inference System in MATLAB, where trapezoidal function is used as membership function for fuzzification and trules inference system and centrold method is used for defuzzification. Accuracy measures gives best value for medium class.

percapitaviolentcrimesprediction's People

Contributors

aashitadutta avatar

Watchers

 avatar  avatar  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.