Sathwikchowdary commited on
Commit
e9d79bd
·
verified ·
1 Parent(s): 823ed64

Update pages/Life_cycle_of_ML.py

Browse files
Files changed (1) hide show
  1. pages/Life_cycle_of_ML.py +22 -18
pages/Life_cycle_of_ML.py CHANGED
@@ -84,6 +84,8 @@ The life cycle of Machine Learning (ML) involves several stages, from defining t
84
  </marker>
85
  </defs>
86
  </svg>
 
 
87
  # Initialize session state for tracking the current lifecycle step
88
  if "step" not in st.session_state:
89
  st.session_state.step = 0
@@ -93,19 +95,19 @@ ml_lifecycle = [
93
  {
94
  "title": "1️⃣ **Problem Statement**",
95
  "description": """
96
- ****:Understanding the problem and setting objectives for the ML model.
97
  """
98
  },
99
  {
100
  "title": "2️⃣ **Data Collection**",
101
  "description": """
102
- ****:Gathering relevant data for model training.
103
  """
104
  },
105
  {
106
  "title": "3️⃣ **Data Preparation**",
107
  "description": """
108
- ****: Initial analysis to understand the dataset's basic properties.
109
  - Steps:
110
  - Handle missing values and outliers.
111
  - Normalize or scale numerical features.
@@ -117,62 +119,68 @@ ml_lifecycle = [
117
  {
118
  "title": "4️⃣ **Feature Engineering**",
119
  "description": """
120
- ****:Select or create the most relevant features for the model.
121
  - Techniques:
122
  - Feature Selection: Choose the most important columns (e.g., using correlation).
123
  - Feature Creation: Combine or transform existing features.
 
124
  """
125
  },
126
  {
127
  "title": "5️⃣ **Model Selection**",
128
  "description": """
129
- ****:Choose the right ML algorithm for your problem.
130
  - Factors to consider:
131
  - Problem type: Classification, Regression, Clustering, etc.
132
  - Data size and structure.
 
133
  """
134
  },
135
  {
136
  "title": "6️⃣ **Training**",
137
  "description": """
138
- ****: Train the ML model using training data.
139
  - Process:
140
  - Split data into training and validation sets.
141
  - Use the training data to fit the model.
 
142
  """
143
  },
144
  {
145
  "title": "7️⃣ **Evaluation**",
146
  "description": """
147
- ****: Assess the model's performance using metrics.
148
- - Metrics:
149
  - Classification: Accuracy, Precision, Recall, F1-Score.
150
  - Regression: Mean Squared Error (MSE), R² Score.
 
151
  """
152
  },
153
  {
154
  "title": "8️⃣ **Deployment**",
155
  "description": """
156
- ****: Integrate the trained model into a production environment.
157
  - Steps:
158
  - Create an API for model predictions.
159
  - Monitor performance on real-world data.
 
160
  """
161
  },
162
  {
163
  "title": "9️⃣ **Monitoring & Maintenance**",
164
  "description": """
165
- ****:Ensure the model continues to perform well over time.
166
- - Monitor:
167
  - Data drift: Changes in data distribution.
168
- - Model decay: Performance deterioration.
 
169
  """
170
  },
171
  ]
172
 
173
  # Display title and description
174
  st.title("📊 Machine Learning Life Cycle")
175
- st.write("Explore the detailed view of life cycle of a Machine Learning project by clicking the steps below:")
176
 
177
  # Buttons for navigation
178
  col1, col2, col3 = st.columns([1, 1, 1])
@@ -190,8 +198,4 @@ st.markdown(current_step['description'])
190
 
191
  # Reset button
192
  if st.button("🔄 Restart"):
193
- st.session_state.step = 0
194
- """
195
-
196
- # Render HTML content in Streamlit
197
- st.markdown(html_content, unsafe_allow_html=True)
 
84
  </marker>
85
  </defs>
86
  </svg>
87
+ st.markdown(html_content, unsafe_allow_html=True)
88
+
89
  # Initialize session state for tracking the current lifecycle step
90
  if "step" not in st.session_state:
91
  st.session_state.step = 0
 
95
  {
96
  "title": "1️⃣ **Problem Statement**",
97
  "description": """
98
+ **Goal**:
99
  """
100
  },
101
  {
102
  "title": "2️⃣ **Data Collection**",
103
  "description": """
104
+ **Goal**:
105
  """
106
  },
107
  {
108
  "title": "3️⃣ **Data Preparation**",
109
  "description": """
110
+ **Goal**: Clean and preprocess the data to make it usable.
111
  - Steps:
112
  - Handle missing values and outliers.
113
  - Normalize or scale numerical features.
 
119
  {
120
  "title": "4️⃣ **Feature Engineering**",
121
  "description": """
122
+ **Goal**: Select or create the most relevant features for the model.
123
  - Techniques:
124
  - Feature Selection: Choose the most important columns (e.g., using correlation).
125
  - Feature Creation: Combine or transform existing features.
126
+ - Example: Extracting 'time spent on website' as a feature from raw session logs.
127
  """
128
  },
129
  {
130
  "title": "5️⃣ **Model Selection**",
131
  "description": """
132
+ **Goal**: Choose the right ML algorithm for your problem.
133
  - Factors to consider:
134
  - Problem type: Classification, Regression, Clustering, etc.
135
  - Data size and structure.
136
+ - Example: Using Logistic Regression for binary classification (e.g., spam detection).
137
  """
138
  },
139
  {
140
  "title": "6️⃣ **Training**",
141
  "description": """
142
+ **Goal**: Train the ML model using training data.
143
  - Process:
144
  - Split data into training and validation sets.
145
  - Use the training data to fit the model.
146
+ - Example: Training a Random Forest on customer purchase data.
147
  """
148
  },
149
  {
150
  "title": "7️⃣ **Evaluation**",
151
  "description": """
152
+ **Goal**: Assess the model's performance using metrics.
153
+ - Common Metrics:
154
  - Classification: Accuracy, Precision, Recall, F1-Score.
155
  - Regression: Mean Squared Error (MSE), R² Score.
156
+ - Example: Evaluating a churn prediction model using accuracy on the test set.
157
  """
158
  },
159
  {
160
  "title": "8️⃣ **Deployment**",
161
  "description": """
162
+ **Goal**: Integrate the trained model into a production environment.
163
  - Steps:
164
  - Create an API for model predictions.
165
  - Monitor performance on real-world data.
166
+ - Example: Deploying a sentiment analysis model as a REST API.
167
  """
168
  },
169
  {
170
  "title": "9️⃣ **Monitoring & Maintenance**",
171
  "description": """
172
+ **Goal**: Ensure the model continues to perform well over time.
173
+ - Monitor for:
174
  - Data drift: Changes in data distribution.
175
+ - Model decay: Performance deterioration.
176
+ - Example: Regularly retraining a sales forecasting model with new data.
177
  """
178
  },
179
  ]
180
 
181
  # Display title and description
182
  st.title("📊 Machine Learning Life Cycle")
183
+ st.write("Explore the detailed life cycle of a Machine Learning project by clicking through the steps below:")
184
 
185
  # Buttons for navigation
186
  col1, col2, col3 = st.columns([1, 1, 1])
 
198
 
199
  # Reset button
200
  if st.button("🔄 Restart"):
201
+ st.session_state.step = 0