Update pages/LIFE_CYCLE_OF_MACHINE_LEARNING.py
Browse files
pages/LIFE_CYCLE_OF_MACHINE_LEARNING.py
CHANGED
@@ -1,307 +1,3 @@
|
|
1 |
-
VAMSHI VARDHAN REDDY
|
2 |
-
ronakreddy_18
|
3 |
-
Online
|
4 |
-
|
5 |
-
VAMSHI VARDHAN REDDY — 12/11/2024 11:37 AM
|
6 |
-
Mandali Jayasree — 12/11/2024 11:37 AM
|
7 |
-
,Brand,Color,Storage,Rating,Screen_size,Battery,Price,Rating_cat,Price_cat
|
8 |
-
0,realme,Gold,64,4.6,6.7,5000,10999,high,Affordable
|
9 |
-
1,realme,Black,64,4.3,6.7,5000,10999,high,Affordable
|
10 |
-
2,vivo,Blue,128,4.4,6.6,5000,13999,high,Affordable
|
11 |
-
3,vivo,Black,128,4.4,6.6,5000,13999,high,Affordable
|
12 |
-
4,vivo,Blue,128,4.3,6.6,5000,15999,high,Affordable... (1 KB left)
|
13 |
-
Expand
|
14 |
-
phones_.csv
|
15 |
-
51 KB
|
16 |
-
show_id,type,title,director,cast,country,date_added,release_year,rating,duration,listed_in,description
|
17 |
-
s1,Movie,Dick Johnson Is Dead,Kirsten Johnson,,United States,"September 25, 2021",2020,PG-13,90 min,Documentaries,"As her father nears the end of his life, filmmaker Kirsten Johnson stages his death in inventive and comical ways to help them both face the inevitable."
|
18 |
-
s2,TV Show,Blood & Water,,"Ama Qamata, Khosi Ngema, Gail Mabalane, Thabang Molaba, Dillon Windvogel, Natasha Thahane, Arno Greeff, Xolile Tshabalala, Getmore Sithole, Cindy Mahlangu, Ryle De Morny, Greteli Fincham, Sello Maake Ka-Ncube, Odwa Gwanya, Mekaila Mathys, Sandi Schultz, Duane Williams, Shamilla Miller, Patrick Mofokeng",South Africa,"September 24, 2021",2021,TV-MA,2 Seasons,"International TV Shows, TV Dramas, TV Mysteries","After crossing paths at a party, a Cape Town teen sets out to prove whether a private-school swimming star is her sister who was abducted at birth."
|
19 |
-
s3,TV Show,Ganglands,Julien Leclercq,"Sami Bouajila, Tracy Gotoas, Samuel Jouy, Nabiha Akkari, Sofia Lesaffre, Salim Kechiouche, Noureddine Farihi, Geert Van Rampelberg, Bakary Diombera",,"September 24, 2021",2021,TV-MA,1 Season,"Crime TV Shows, International TV Shows, TV Action & Adventure","To protect his family from a powerful drug lord, skilled thief Mehdi and his expert team of robbers are pulled into a violent and deadly turf war."
|
20 |
-
s4,TV Show,Jailbirds New Orleans,,,,"September 24, 2021",2021,TV-MA,1 Season,"Docuseries, Reality TV","Feuds, flirtations and toilet talk go down among the incarcerated women at the Orleans Justice Center in New Orleans on this gritty reality series."
|
21 |
-
s5,TV Show,Kota Factory,,"Mayur More, Jitendra Kumar, Ranjan Raj, Alam Khan, Ahsaas Channa, Revathi Pillai, Urvi Singh, Arun Kumar",India,"September 24, 2021",2021,TV-MA,2 Seasons,"International TV Shows, Romantic TV Shows, TV Comedies","In a city of coaching centers known to train India’s finest collegiate minds, an earnest but unexceptional student and his friends navigate campus life."
|
22 |
-
Expand
|
23 |
-
Netflix.csv
|
24 |
-
40 KB
|
25 |
-
order_id,customer_id,order_date
|
26 |
-
1,1,2023-05-01
|
27 |
-
2,2,2023-05-02
|
28 |
-
3,3,2023-05-03
|
29 |
-
4,1,2023-05-04
|
30 |
-
5,2,2023-05-05
|
31 |
-
Expand
|
32 |
-
Orders.csv
|
33 |
-
1 KB
|
34 |
-
product_id,product_name,price
|
35 |
-
1,"Product A",10
|
36 |
-
2,"Product B",15
|
37 |
-
3,"Product C",20
|
38 |
-
4,"Product D",25
|
39 |
-
5,"Product E",30
|
40 |
-
Expand
|
41 |
-
products.csv
|
42 |
-
1 KB
|
43 |
-
order_id,product_id,quantity
|
44 |
-
1,1,2
|
45 |
-
1,2,1
|
46 |
-
2,2,1
|
47 |
-
2,3,3
|
48 |
-
3,1,1
|
49 |
-
Expand
|
50 |
-
Order_items.csv
|
51 |
-
1 KB
|
52 |
-
customer_id,first_name,last_name,email
|
53 |
-
1,John,Doe,[email protected]
|
54 |
-
2,Jane,Smith,[email protected]
|
55 |
-
3,Bob,Johnson,[email protected]
|
56 |
-
4,Alice,Brown,[email protected]
|
57 |
-
5,Charlie,Davis,[email protected]
|
58 |
-
Expand
|
59 |
-
Customers.csv
|
60 |
-
1 KB
|
61 |
-
Mandali Jayasree — 12/11/2024 2:51 PM
|
62 |
-
import streamlit as st
|
63 |
-
|
64 |
-
# page navigation
|
65 |
-
if 'page' not in st.session_state:
|
66 |
-
st.session_state.page = "home" # Default page is "home"
|
67 |
-
Expand
|
68 |
-
message.txt
|
69 |
-
4 KB
|
70 |
-
VAMSHI VARDHAN REDDY — 12/11/2024 3:21 PM
|
71 |
-
import streamlit as st
|
72 |
-
|
73 |
-
# Inject custom CSS to style the buttons
|
74 |
-
st.markdown("""
|
75 |
-
<style>
|
76 |
-
.stButton>button {
|
77 |
-
Expand
|
78 |
-
message.txt
|
79 |
-
11 KB
|
80 |
-
VAMSHI VARDHAN REDDY — 12/11/2024 5:34 PM
|
81 |
-
import streamlit as st
|
82 |
-
import pandas as pd
|
83 |
-
import json
|
84 |
-
import xml.etree.ElementTree as ET
|
85 |
-
|
86 |
-
# Inject custom CSS to style the buttons
|
87 |
-
Expand
|
88 |
-
message.txt
|
89 |
-
11 KB
|
90 |
-
Mandali Jayasree — 12/11/2024 5:36 PM
|
91 |
-
Hey
|
92 |
-
Change chesava
|
93 |
-
Aipoyindha
|
94 |
-
VAMSHI VARDHAN REDDY — 12/11/2024 5:40 PM
|
95 |
-
Done
|
96 |
-
Ayipoyindi
|
97 |
-
Mandali Jayasree — 12/11/2024 5:43 PM
|
98 |
-
Em change chesaru
|
99 |
-
Motham change cheyyala malli
|
100 |
-
Intiki vellaka msg chestha okasari cheppu naku
|
101 |
-
VAMSHI VARDHAN REDDY — 12/11/2024 5:44 PM
|
102 |
-
Ok
|
103 |
-
Chepta
|
104 |
-
Mandali Jayasree — 12/11/2024 6:40 PM
|
105 |
-
Vamshi
|
106 |
-
Ela cheyyali cheppu
|
107 |
-
Mandali Jayasree — 12/11/2024 7:32 PM
|
108 |
-
Chesesa aipoyindhi
|
109 |
-
VAMSHI VARDHAN REDDY — 12/11/2024 7:36 PM
|
110 |
-
Okk
|
111 |
-
Mandali Jayasree — 12/11/2024 7:40 PM
|
112 |
-
Writing and reading excel anthe chesa inka em cheyyaledhu
|
113 |
-
VAMSHI VARDHAN REDDY — 12/11/2024 7:42 PM
|
114 |
-
??
|
115 |
-
Ochindha ga aipudu ayitey motam
|
116 |
-
Mandali Jayasree — 12/11/2024 7:45 PM
|
117 |
-
Haa
|
118 |
-
VAMSHI VARDHAN REDDY — Yesterday at 2:50 PM
|
119 |
-
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101Firefox/106.0',
|
120 |
-
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp./;q= 0.8',
|
121 |
-
'Accept-Language': 'en-US,en;q=0.5',
|
122 |
-
#'Accept-Encoding': 'gzip, deflate, br',
|
123 |
-
'DNT': '1',
|
124 |
-
'Connection': 'keep-alive',
|
125 |
-
'Upgrade-Insecure-Requests': '1',
|
126 |
-
'Sec-Fetch-Dest': 'document',
|
127 |
-
'Sec-Fetch-Mode': 'navigate',
|
128 |
-
'Sec-Fetch-Site': 'none',
|
129 |
-
'Sec-Fetch-User': '?1',
|
130 |
-
}
|
131 |
-
VAMSHI VARDHAN REDDY — Today at 2:44 PM
|
132 |
-
What is an Image in Machine Learning?
|
133 |
-
Data Representation:
|
134 |
-
An image is represented as a matrix (2D) or tensor (3D) of pixel values, where each pixel contains information about color and intensity (e.g., RGB values).
|
135 |
-
|
136 |
-
Input for Models:
|
137 |
-
Images serve as input data for machine learning models, particularly in computer vision tasks like classification, segmentation, and object detection.
|
138 |
-
|
139 |
-
High-Dimensional Data:
|
140 |
-
Images are typically high-dimensional, meaning a single image can have thousands or millions of pixel values, requiring dimensionality reduction or feature extraction techniques.
|
141 |
-
|
142 |
-
Preprocessing and Augmentation:
|
143 |
-
Machine learning models often require image preprocessing (e.g., resizing, normalization) and data augmentation (e.g., rotations, flips) to improve performance and generalization.
|
144 |
-
-----------
|
145 |
-
intro
|
146 |
-
Introduction to Image
|
147 |
-
An image is a two-dimensional visual representation of an object, scene, person, or concept. It can be captured, created, or stored using various technologies like cameras, scanners, or computer graphics software. Images play a crucial role in how humans and machines interpret the world visually.
|
148 |
-
|
149 |
-
Images are made up of small individual units called pixels (short for picture elements). Each pixel carries information about brightness and color. When viewed together, these pixels form the complete visual.
|
150 |
-
|
151 |
-
Types of Images
|
152 |
-
Raster Images (Bitmap):
|
153 |
-
Composed of a grid of pixels, common formats include JPEG, PNG, and GIF.
|
154 |
-
|
155 |
-
Vector Images:
|
156 |
-
Defined mathematically (using lines, curves, and shapes), common format is SVG.
|
157 |
-
|
158 |
-
3D Images:
|
159 |
-
Represent objects in three dimensions, used in modeling and rendering.
|
160 |
-
|
161 |
-
Image Representation
|
162 |
-
Grayscale Image: Contains shades of gray, with each pixel having a single intensity value (0 for black to 255 for white).
|
163 |
-
Color Image: Typically represented in the RGB (Red, Green, Blue) color space, where each pixel has three values corresponding to red, green, and blue intensity.
|
164 |
-
Applications of Images
|
165 |
-
Photography & Visual Media: Capturing moments and storytelling.
|
166 |
-
Medical Imaging: X-rays, MRIs for diagnostics.
|
167 |
-
Machine Learning & AI: Tasks like image classification, object detection, and facial recognition.
|
168 |
-
Remote Sensing: Satellite imagery for geographic studies.
|
169 |
-
Graphic Design & Art: Creative visual works for marketing and design.
|
170 |
-
Images are a key medium for communication, analysis, and automation, making them fundamental in various fields.
|
171 |
-
-------------
|
172 |
-
Color Spaces in Machine Learning
|
173 |
-
Definition:
|
174 |
-
A color space is a mathematical model that defines how colors are represented. In machine learning, different color spaces can be used to preprocess and analyze image data for tasks like classification, segmentation, or object detection.
|
175 |
-
|
176 |
-
Common Types:
|
177 |
-
|
178 |
-
RGB (Red, Green, Blue): The most common color space for digital images; each pixel is represented by a combination of red, green, and blue values.
|
179 |
-
HSV (Hue, Saturation, Value): Separates color (hue) from intensity (value), useful for color-based segmentation.
|
180 |
-
CMYK (Cyan, Magenta, Yellow, Black): Used for printing applications.
|
181 |
-
LAB (Lightness, A, B): Designed for perceptual uniformity, useful for color correction tasks.
|
182 |
-
Use Cases:
|
183 |
-
|
184 |
-
RGB: Best for display and general-purpose image analysis.
|
185 |
-
HSV: Helpful for tasks where color intensity and shade variations need to be separated, such as object tracking.
|
186 |
-
LAB: Preferred when color consistency and accuracy are critical.
|
187 |
-
Color Space Conversion:
|
188 |
-
Images can be converted between different color spaces to make preprocessing or analysis easier. For example, converting from RGB to HSV for color-based object detection or segmentation.
|
189 |
-
|
190 |
-
Impact on Machine Learning:
|
191 |
-
Choosing the right color space can enhance model performance, especially in tasks like:
|
192 |
-
|
193 |
-
Image Classification (e.g., using RGB).
|
194 |
-
Color Segmentation (e.g., using HSV).
|
195 |
-
Edge Detection and Enhancement (e.g., using grayscale or LAB).
|
196 |
-
Different color spaces provide flexibility in handling various challenges in computer vision tasks.
|
197 |
-
VAMSHI VARDHAN REDDY — Today at 2:56 PM
|
198 |
-
import streamlit as st
|
199 |
-
import pandas as pd
|
200 |
-
import json
|
201 |
-
import xml.etree.ElementTree as ET
|
202 |
-
from PIL import Image
|
203 |
-
import numpy as np
|
204 |
-
import matplotlib.pyplot as plt
|
205 |
-
|
206 |
-
# Inject custom CSS to style the buttons
|
207 |
-
st.markdown("""
|
208 |
-
<style>
|
209 |
-
.stButton>button {
|
210 |
-
background-color: #4CAF50;
|
211 |
-
color: white;
|
212 |
-
width: 100%;
|
213 |
-
}
|
214 |
-
</style>
|
215 |
-
""", unsafe_allow_html=True)
|
216 |
-
|
217 |
-
# Initialize page navigation state
|
218 |
-
if 'page' not in st.session_state:
|
219 |
-
st.session_state.page = "home" # Default page is "home"
|
220 |
-
|
221 |
-
# ----------------- Home Page -----------------
|
222 |
-
def home_page():
|
223 |
-
st.title(":green[Lifecycle of a Machine Learning Project]")
|
224 |
-
st.markdown("Click on a stage to learn more about it.")
|
225 |
-
|
226 |
-
# Buttons for various stages of the ML project lifecycle
|
227 |
-
if st.button(":blue[📊 Data Collection]"):
|
228 |
-
st.session_state.page = "data_collection"
|
229 |
-
|
230 |
-
if st.button(":blue[🌟 Problem Statement]"):
|
231 |
-
st.markdown("### Problem Statement\nIdentify the problem you want to solve and set clear objectives and success criteria.")
|
232 |
-
|
233 |
-
if st.button(":blue[🛠️ Simple EDA]"):
|
234 |
-
st.markdown("### Simple EDA\nPerform exploratory data analysis to understand data distributions and relationships.")
|
235 |
-
|
236 |
-
if st.button(":blue[🧹 Data Pre-Processing]"):
|
237 |
-
st.markdown("### Data Pre-Processing\nConvert raw data into cleaned data.")
|
238 |
-
|
239 |
-
if st.button(":blue[📈 Exploratory Data Analysis (EDA)]"):
|
240 |
-
st.markdown("### Exploratory Data Analysis (EDA)\nVisualize and analyze the data to understand its distributions and relationships.")
|
241 |
-
|
242 |
-
if st.button(":blue[🏋️ Feature Engineering]"):
|
243 |
-
st.markdown("### Feature Engineering\nCreate new features from existing data.")
|
244 |
-
|
245 |
-
if st.button(":blue[🤖 Model Training]"):
|
246 |
-
st.markdown("### Model Training\nTrain the model using the training data and optimize its parameters.")
|
247 |
-
|
248 |
-
if st.button(":blue[🔧 Model Testing]"):
|
249 |
-
st.markdown("### Model Testing\nAssess the model's performance using various metrics and cross-validation techniques.")
|
250 |
-
|
251 |
-
if st.button(":blue[🚀 Model Deployment]"):
|
252 |
-
st.markdown("### Model Deployment\nIntegrate the trained model into a production environment and monitor its performance.")
|
253 |
-
|
254 |
-
if st.button(":blue[📝 Monitoring]"):
|
255 |
-
st.markdown("### Monitoring\nPeriodically retrain the model with new data and update features as needed.")
|
256 |
-
|
257 |
-
# ----------------- Data Collection Page -----------------
|
258 |
-
def data_collection_page():
|
259 |
-
st.title(":red[Data Collection]")
|
260 |
-
st.markdown("### Data Collection\nThis page discusses the process of Data Collection.")
|
261 |
-
st.markdown("Types of Data: **Structured**, **Unstructured**, **Semi-Structured**")
|
262 |
-
|
263 |
-
if st.button(":blue[🌟 Structured Data]"):
|
264 |
-
st.session_state.page = "structured_data"
|
265 |
-
|
266 |
-
if st.button(":blue[📷 Unstructured Data]"):
|
267 |
-
st.session_state.page = "unstructured_data"
|
268 |
-
|
269 |
-
if st.button(":blue[🗃️ Semi-Structured Data]"):
|
270 |
-
st.session_state.page = "semi_structured_data"
|
271 |
-
|
272 |
-
if st.button("Back to Home"):
|
273 |
-
st.session_state.page = "home"
|
274 |
-
|
275 |
-
# ----------------- Structured Data Page -----------------
|
276 |
-
def structured_data_page():
|
277 |
-
st.title(":blue[Structured Data]")
|
278 |
-
st.markdown("""
|
279 |
-
Structured data is highly organized and typically stored in tables like spreadsheets or databases. It is easy to search and analyze.
|
280 |
-
""")
|
281 |
-
st.markdown("### Examples: Excel files")
|
282 |
-
|
283 |
-
if st.button(":green[📊 Excel]"):
|
284 |
-
st.session_state.page = "excel"
|
285 |
-
|
286 |
-
if st.button("Back to Data Collection"):
|
287 |
-
st.session_state.page = "data_collection"
|
288 |
-
|
289 |
-
# ----------------- Excel Data Page -----------------
|
290 |
-
def excel_page():
|
291 |
-
st.title(":green[Excel Data Format]")
|
292 |
-
|
293 |
-
st.write("### What is Excel?")
|
294 |
-
st.write("Excel is a spreadsheet tool for storing data in tabular format with rows and columns. Common file extensions: .xls, .xlsx.")
|
295 |
-
|
296 |
-
st.write("### How to Read Excel Files")
|
297 |
-
st.code("""
|
298 |
-
... (314 lines left)
|
299 |
-
Collapse
|
300 |
-
message.txt
|
301 |
-
14 KB
|
302 |
-
|
303 |
-
Mandali Jayasree
|
304 |
-
mandalijayasree
|
305 |
import streamlit as st
|
306 |
import pandas as pd
|
307 |
import json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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