Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
| 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 -------------
|