Zero_to_Hero_ML / pages /Life_cycle_of_ML.py
Sathwikchowdary's picture
Update pages/Life_cycle_of_ML.py
9d88a3f verified
raw
history blame
3.14 kB
## Shapes Representing the ML Life Cycle
<svg width="600" height="300">
<!-- Problem Definition (Rectangle) -->
<rect x="50" y="50" width="150" height="50" fill="#FFB6C1" stroke="#000" />
<text x="75" y="80" fill="#000" font-size="14">Problem Definition</text>
<!-- Data Collection (Circle) -->
<circle cx="300" cy="75" r="40" fill="#ADD8E6" stroke="#000" />
<text x="270" y="80" fill="#000" font-size="14">Data Collection</text>
<!-- Data Preprocessing (Ellipse) -->
<ellipse cx="500" cy="75" rx="80" ry="40" fill="#90EE90" stroke="#000" />
<text x="445" y="80" fill="#000" font-size="14">Data Preprocessing</text>
<!-- Arrows between Problem Definition and Data Collection -->
<line x1="200" y1="75" x2="260" y2="75" stroke="#000" marker-end="url(#arrow)" />
<!-- Model Building (Rectangle) -->
<rect x="50" y="200" width="150" height="50" fill="#FFD700" stroke="#000" />
<text x="75" y="230" fill="#000" font-size="14">Model Building</text>
<!-- Evaluation (Circle) -->
<circle cx="300" cy="225" r="40" fill="#FF7F50" stroke="#000" />
<text x="275" y="230" fill="#000" font-size="14">Evaluation</text>
<!-- Deployment (Rectangle) -->
<rect x="450" y="200" width="150" height="50" fill="#9370DB" stroke="#000" />
<text x="475" y="230" fill="#000" font-size="14">Deployment</text>
<!-- Arrows between Model Building, Evaluation, and Deployment -->
<line x1="125" y1="250" x2="260" y2="225" stroke="#000" marker-end="url(#arrow)" />
<line x1="340" y1="225" x2="450" y2="225" stroke="#000" marker-end="url(#arrow)" />
<!-- Define arrow marker -->
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="4" markerHeight="4" orient="auto">
<polygon points="0,0 10,5 0,10" fill="#000" />
</marker>
</defs>
</svg>
"""
# Render HTML content in Streamlit
st.markdown(html_content, unsafe_allow_html=True)
# Render the SVG
st.markdown(html_content, unsafe_allow_html=True)
# Interactive buttons for stages
st.subheader("Stages in ML Life Cycle")
if st.button("Problem Statement"):
st.write("Understanding the problem and setting objectives for the ML model.")
if st.button("Data Collection"):
st.write("Gathering relevant data for model training.")
if st.button("Simple EDA"):
st.write("Initial analysis to understand the dataset's basic properties.")
if st.button("Data Preprocessing"):
st.write("Cleaning the data to ensure it's in a usable format.")
if st.button("EDA"):
st.write("Deeper analysis to gain insights and find patterns in the data.")
if st.button("Feature Engineering"):
st.write("Creating new features or modifying existing ones to improve model performance.")
if st.button("Training"):
st.write("Training machine learning models using the processed data.")
if st.button("Testing"):
st.write("Evaluating the trained model using a test set to assess its performance.")
if st.button("Deploying"):
st.write("Deploying the model to a production environment.")
if st.button("Monitoring"):
st.write("Continuously monitoring the model's performance in the production environment.")