Skip to content

lethalSopaper/flores_iris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Iris Perceptron Classification

This task implements a custom perceptron classifier for the famous Iris dataset using a one-vs-all approach for multi-class classification.

Description

The iris_perceptroon_task.py script contains:

  • A custom BioPerceptron class that implements a basic perceptron algorithm
  • Multi-class classification using three binary perceptrons (one for each Iris species)
  • Data preprocessing with StandardScaler
  • Visualization of predictions using PCA dimensionality reduction

Requirements

  • Python 3.7+
  • numpy
  • matplotlib
  • scikit-learn

Installation

  1. Clone or download this project

  2. Create a virtual environment (recommended):

    python -m venv .venv
    source .venv/bin/activate  # On Linux/Mac
    # or
    .venv\Scripts\activate     # On Windows
  3. Install dependencies:

    pip install -r requirements.txt

Usage

Run the perceptron classification:

python iris_perceptroon_task.py

Output

The script will:

  1. Train three perceptrons (one for each Iris class: setosa, versicolor, virginica)
  2. Test the model on 20% of the dataset
  3. Print the accuracy percentage
  4. Display a 2D PCA visualization of the predicted classes

Expected Results

The perceptron typically achieves high accuracy (often 100%) on the Iris dataset due to the dataset's linear separability, especially for the setosa class.

About

This repo is only created fot the submision of the task

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages