August 8, 2023

Overview

This presentation serves to be a deliverable for a course project in coursera. This aims to create a Shiny Application about prediction of Iris Flower Species using its following related features:

Feature Iris Species
Petal Width Setosa
Petal Length Versicolor
Virginica

The shiny application created for the initial part of the assignment demonstration is now accessible via this link:

Shiny App for Prediction of Iris Species

Github Link for the ui.R and server.R

Iris Prediction Application

The Iris Prediction App is an interactive web application built using the Shiny framework in R. It enables users to input petal length and width values of an iris flower and obtain predictions for the species using a pre-trained random forest model. The app showcases its functionality through:

  • Input and Prediction: Users can adjust sliders for petal length and width, then click “Predict” to receive the predicted iris species.

  • Visual Representation: The app generates a scatter plot that compares selected input values with the Iris dataset, using color-coding for species differentiation.

  • Predicted Species and Table: The predicted species based on user input is displayed, highlighting the model’s classification accuracy.

Iris Dataset

The Iris dataset consists of measurements of sepal and petal lengths and widths for three iris flower species: Setosa, Versicolor, and Virginica. With 150 samples, each species has 50 observations. This widely-used dataset is a go-to example for illustrating classification and clustering techniques in machine learning due to its distinct species characteristics.

The dataset consists of the following four numerical attributes (features):

  1. Sepal Length: The length of the sepal (the leaf-like structure at the base of the flower).

  2. Sepal Width: The width of the sepal.

  3. Petal Length: The length of the petal (the colorful part of the flower).

  4. Petal Width: The width of the petal.

For this prediction we only use the Petal Length and Petal Width to predict the species of iris.

  Sepal.Length    Sepal.Width     Petal.Length    Petal.Width   
 Min.   :4.300   Min.   :2.000   Min.   :1.000   Min.   :0.100  
 1st Qu.:5.100   1st Qu.:2.800   1st Qu.:1.600   1st Qu.:0.300  
 Median :5.800   Median :3.000   Median :4.350   Median :1.300  
 Mean   :5.843   Mean   :3.057   Mean   :3.758   Mean   :1.199  
 3rd Qu.:6.400   3rd Qu.:3.300   3rd Qu.:5.100   3rd Qu.:1.800  
 Max.   :7.900   Max.   :4.400   Max.   :6.900   Max.   :2.500  
       Species  
 setosa    :50  
 versicolor:50  
 virginica :50  
                
                
                

Sample Scatter Plot of Petal Length and Petal Width

This will generate a scatter plot that displays the relationship between Petal Length and Petal Width for each iris species in the Iris dataset. The scatter plot will be included in the generated document.