kheejay88 commited on
Commit
fb87488
·
verified ·
1 Parent(s): 1b013af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -29
app.py CHANGED
@@ -57,35 +57,38 @@ tab1, tab2, tab3 = st.tabs(["🏠 About", "📊 Data Visualization", "🔎 Model
57
  with tab1:
58
  st.header("About This App")
59
  st.markdown("""
60
- ## **Overview**
61
- This application demonstrates **unsupervised machine learning** using the Iris dataset.
62
- The app clusters data points based on the features of iris flowers using the **K-Means clustering algorithm**.
63
- After clustering, meaningful labels are assigned based on the cluster’s statistical properties.
64
-
65
- ## **How It Works**
66
- 1. **Data Preprocessing:**
67
- - The dataset is standardized using `StandardScaler` to ensure uniform feature scaling.
68
-
69
- 2. **Clustering:**
70
- - K-Means clustering is applied to group the data into **three clusters**.
71
- - The number of clusters is based on the natural grouping of the Iris dataset.
72
-
73
- 3. **Cluster Labeling:**
74
- - After clustering, each cluster is assigned a meaningful label based on its centroid properties and domain knowledge.
75
-
76
- 4. **Model Testing:**
77
- - The app allows the user to enter custom feature values.
78
- - The model predicts the cluster and assigns a meaningful label to the input data.
79
-
80
- ## **Dataset Information**
81
- The Iris dataset contains **150 samples** of iris flowers.
82
- Each sample includes the following features:
83
- - 🌸 Sepal Length (cm)
84
- - 🌸 Sepal Width (cm)
85
- - 🌸 Petal Length (cm)
86
- - 🌸 Petal Width (cm)
87
-
88
- The goal of clustering is to find natural patterns among these measurements.
 
 
 
89
  """)
90
 
91
  # ------------- Data Visualization Tab -------------
 
57
  with tab1:
58
  st.header("About This App")
59
  st.markdown("""
60
+ ## **Overview**
61
+ This application demonstrates **unsupervised machine learning** using the Iris dataset.
62
+ The app clusters data points based on the features of iris flowers using the **K-Means clustering algorithm**.
63
+ After clustering, meaningful labels are assigned based on the cluster’s statistical properties.
64
+
65
+ ## **How It Works**
66
+ 1. **Data Preprocessing:**
67
+ - The dataset is standardized using `StandardScaler` to ensure uniform feature scaling.
68
+
69
+ 2. **Clustering:**
70
+ - K-Means clustering is applied to group the data into **three clusters**.
71
+ - The number of clusters is based on the natural grouping of the Iris dataset.
72
+
73
+ 3. **Cluster Labeling:**
74
+ - After clustering, each cluster is assigned a meaningful label based on its centroid properties and domain knowledge.
75
+
76
+ 4. **Model Testing:**
77
+ - The app allows the user to enter custom feature values.
78
+ - The model predicts the cluster and assigns a meaningful label to the input data.
79
+
80
+ ## **Dataset Information**
81
+ """)
82
+ st.write(pd.DataFrame(load_iris()['data'], columns=load_iris()['feature_names']).head())
83
+ st.markdown("""
84
+ The Iris dataset contains **150 samples** of iris flowers.
85
+ Each sample includes the following features:
86
+ - 🌸 Sepal Length (cm)
87
+ - 🌸 Sepal Width (cm)
88
+ - 🌸 Petal Length (cm)
89
+ - 🌸 Petal Width (cm)
90
+
91
+ The goal of clustering is to find natural patterns among these measurements.
92
  """)
93
 
94
  # ------------- Data Visualization Tab -------------