MachineLearning / pages /3Life Cycle of Machine Learning Project.py
LakshmiHarika's picture
Update pages/3Life Cycle of Machine Learning Project.py
43e17cc verified
import streamlit as st
# Page configuration
st.set_page_config(
page_title="Life Cycle of Machine Learning Project",
page_icon="🚀",
layout="wide"
)
# Global CSS for consistent styling
st.markdown("""
<style>
h1 {
text-align: center;
color: #BB3385;
margin-top: 20px;
margin-bottom: 10px;
}
.description {
text-align: center;
font-size: 18px;
margin-bottom: 40px;
color: #333333;
}
.circle-container {
display: flex;
justify-content: center;
align-items: center;
margin-top: 90px;
position: relative;
}
.circle {
position: relative;
width: 600px; /* Increased size from 400px */
height: 600px; /* Increased size from 400px */
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
background: transparent;
}
.steps {
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.step {
position: absolute;
width: 150px; /* Increased size from 150px */
height: 60px; /* Increased size from 60px */
font-size: 13px; /* Slightly larger font size */
color: black;
font-weight: bold; /* Bold text */
border-radius: 30px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
transform-origin: 50% 50%;
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
background-color: rgba(255, 255, 255, 0.9);
cursor: pointer;
}
#step1 { transform: rotate(0deg) translateX(300px) rotate(-0deg); background-color: #FFCCCB; } /* Light Red */
#step2 { transform: rotate(36deg) translateX(300px) rotate(-36deg); background-color: #FFD700; } /* Gold */
#step3 { transform: rotate(72deg) translateX(300px) rotate(-72deg); background-color: #90EE90; } /* Light Green */
#step4 { transform: rotate(108deg) translateX(300px) rotate(-108deg); background-color: #ADD8E6; } /* Light Blue */
#step5 { transform: rotate(144deg) translateX(300px) rotate(-144deg); background-color: #FFB6C1; } /* Light Pink */
#step6 { transform: rotate(180deg) translateX(300px) rotate(-180deg); background-color: #FFA07A; } /* Light Salmon */
#step7 { transform: rotate(216deg) translateX(300px) rotate(-216deg); background-color: #D8BFD8; } /* Thistle */
#step8 { transform: rotate(252deg) translateX(300px) rotate(-252deg); background-color: #FFFFE0; } /* Light Yellow */
#step9 { transform: rotate(288deg) translateX(300px) rotate(-288deg); background-color: #E0FFFF; } /* Light Cyan */
#step10 { transform: rotate(324deg) translateX(300px) rotate(-324deg); background-color: #F5DEB3; } /* Wheat */
</style>
""", unsafe_allow_html=True)
# Render the title
st.markdown('<h1>Life Cycle of End-to-End ML Project</h1>', unsafe_allow_html=True)
# Add the description above the circular layout
st.markdown(
"""
<div class="description">
- In this page, I will take you through the 10 crucial steps involved in the life cycle of a Machine Learning project.<br>
- Each step plays a significant role in ensuring the success of the project.
</div>
""",
unsafe_allow_html=True,
)
# Render the circular layout with buttons that redirect to different pages
st.markdown(
"""
<div class="circle-container">
<div class="circle">
<div class="steps">
<a href="/problem_statement" target="_self" class="step" id="step9">1. Problem Statement</a>
<a href="/Data_Collection" target="_self" class="step" id="step10">2. Data Collection</a>
<a href="/simple_eda" target="_self" class="step" id="step1">3. Simple EDA</a>
<a href="/data_preprocessing" target="_self" class="step" id="step2">4. Data Preprocessing</a>
<a href="/eda" target="_self" class="step" id="step3">5. EDA</a>
<a href="/feature_engineering" target="_self" class="step" id="step4">6. Feature Engineering</a>
<a href="/model_training" target="_self" class="step" id="step5">7. Model Training</a>
<a href="/model_testing" target="_self" class="step" id="step6">8. Model Testing</a>
<a href="/model_deployment" target="_self" class="step" id="step7">9. Model Deployment</a>
<a href="/monitoring" target="_self" class="step" id="step8">10. Monitoring</a>
</div>
</div>
</div>
""",
unsafe_allow_html=True
)
st.markdown("<br><br><br>", unsafe_allow_html=True)
# Additional content
st.markdown("""
**Problem Statement**:
- Clearly define the business or research problem.
- Identify the objectives and success criteria.
**Data Collection**:
- Collect data from reliable sources.
- Ensure the data is relevant and sufficient for the problem.
**Simple EDA (Exploratory Data Analysis)**:
- Perform initial data exploration to understand basic patterns.
- Quickly check for missing or inconsistent data.
**Data Preprocessing**:
- Clean the data by handling missing values and correcting errors.
- Transform data types and normalize or scale features as needed.
**EDA**:
- Perform detailed analysis to uncover insights.
- Visualize data relationships using charts and graphs.
**Feature Engineering**:
- Create new features that enhance model performance.
- Select or transform existing features to improve relevance.
**Model Training**:
- Choose appropriate machine learning algorithms.
- Train models and optimize hyperparameters for best performance.
**Model Testing**:
- Evaluate the model's performance with test data.
- Perform cross-validation and analyze performance metrics.
**Model Deployment**:
- Deploy the model into a production environment.
- Ensure the model can handle real-time data and user requests.
**Monitoring**:
- Continuously monitor the model's performance over time.
- Update and retrain the model to maintain accuracy and relevance.
""")