Giter Club home page Giter Club logo

random-classification's Introduction

RANDOM CLASSIFICATION

AIM:

To write a python program to perform random classification.

EQUIPMENTS REQUIRED:

  1. Hardware โ€“ PCs
  2. Anaconda โ€“ Python 3.7 Installation / Google Colab /Jupiter Notebook

RELATED THEORITICAL CONCEPT:

Random classifier: It creates a set of decision trees from randomly selected subset of training set. It then aggregates the votes from different decision trees to decide the final class of the test object. Random Forest is suitable for situations when we have a large dataset, and interpretability is not a major concern.

Purpose of Random classifier: One of the most important features of the Random Forest Algorithm is that it can handle the data set containing continuous variables as in the case of regression and categorical variables as in the case of classification.

ALGORITHM:

  1. In Random forest n number of random records are taken from the data set having k number of records.
  2. Individual decision trees are constructed for each sample.
  3. Each decision tree will generate an output.
  4. Final output is considered based on Majority Voting or Averaging for Classification and regression respectively.

PROGRAM:

python

#Program to implement random classification. #Developed by : Vigneshwar S #Register Number : 212220230058

import matplotlib.pyplot as plt from sklearn import datasets x,y=datasets.make_blobs(n_samples=100,n_features=2,centers=2,cluster_std=1.05,random_state=2) fig=plt.figure(figsize=(10,8)) plt.plot(x[:,0][y==0],x[:,1][y==0],'r^') plt.plot(x[:,0][y==1],x[:,1][y==1],'bs') plt.xlabel("feature 1") plt.ylabel("feature 2") plt.title('Random Classification Data with 2 classes')

OUTPUT:

image

RESULT:

Thus the random classifier was successfully implemented using python programming.

random-classification's People

Contributors

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