🌸 Welcome to the Iris Flower Predictor

Predict the Petal Width of Iris Flowers Based on Input Features

Built using R Shiny, linear models, and interactive UI

📊 What Is This App?

  • Predicts Petal Width using features like Sepal Width, Sepal Length, Petal Length, and Species
  • Built with Shiny for interactivity
  • Shows dynamic predictions, model info, and visual output
  • Lightweight, browser-based — No installation needed
  • Demo hosted at: shinyapps.io link

🖼️ Dataset: The Famous Iris Dataset

  • Contains 150 measurements of 3 iris flower species: setosa, versicolor, and virginica
  • Variables used:
    • Sepal.Width, Sepal.Length
    • Petal.Length, Species
    • Petal.Width (predicted)

⚙️ How the App Works

  • You select input features from a sidebar
  • Click Predict ➡ App returns the predicted petal width
  • You see:
    • A graph of prediction
    • R² value, error bars
    • Species-wise output
  • All in real-time (thanks to reactive programming in R)

💻 Under the Hood: The Model

model <- lm(Petal.Width ~ Sepal.Width + Sepal.Length + Petal.Length + Species, data = iris)
summary(model)
## 
## Call:
## lm(formula = Petal.Width ~ Sepal.Width + Sepal.Length + Petal.Length + 
##     Species, data = iris)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.59239 -0.08288 -0.01349  0.08773  0.45239 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       -0.47314    0.17659  -2.679  0.00824 ** 
## Sepal.Width        0.24220    0.04776   5.072 1.20e-06 ***
## Sepal.Length      -0.09293    0.04458  -2.084  0.03889 *  
## Petal.Length       0.24220    0.04884   4.959 1.97e-06 ***
## Speciesversicolor  0.64811    0.12314   5.263 5.04e-07 ***
## Speciesvirginica   1.04637    0.16548   6.323 3.03e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1666 on 144 degrees of freedom
## Multiple R-squared:  0.9538, Adjusted R-squared:  0.9522 
## F-statistic: 594.9 on 5 and 144 DF,  p-value: < 2.2e-16

📈 Model Diagnostics

🌟 Why This App?

  • Simple, intuitive prediction interface
  • Combines multiple iris features and species info
  • Visual feedback with interactive plots
  • Educates users on regression and shiny apps
  • Fully reproducible and extendable

🔗 Source & Demo