sree4411's picture
Update pages/5_ML Algorithms.py
b0e575a verified
import streamlit as st
st.set_page_config(page_title="ML Algorithms", layout="centered")
st.title("πŸ€– Machine Learning Algorithms Overview")
st.markdown("""
This gives a quick overview of **core Machine Learning algorithms** and their types.
Explore **Supervised** and **Unsupervised** learning with common algorithms like **KNN**, **SVM**, **Decision Trees**, etc.
""")
ml_type = st.selectbox("Select Type of Machine Learning", ["Supervised Learning", "Unsupervised Learning"])
if ml_type == "Supervised Learning":
st.header("πŸ“˜ Supervised Learning")
st.write("Supervised learning works with **labeled data**, where the goal is to predict a target (output) from input features.")
st.subheader("πŸ”Ή Common Algorithms:")
st.markdown("""
- **Linear Regression** β†’ Predicts continuous values
- **Logistic Regression** β†’ Binary or multiclass classification
- **K-Nearest Neighbors (KNN)** β†’ Classifies based on closest data points
- **Support Vector Machine (SVM)** β†’ Classifies using hyperplanes
- **Decision Tree** β†’ Uses tree-based decision rules
- **Random Forest** β†’ Ensemble of decision trees
""")
st.subheader("πŸ› οΈ Use Cases:")
st.markdown("""
- Email spam detection
- House price prediction
- Medical diagnosis
- Loan approval
""")
elif ml_type == "Unsupervised Learning":
st.header("πŸ“™ Unsupervised Learning")
st.write("Unsupervised learning deals with **unlabeled data**. It finds hidden patterns, groupings, or structures in the data.")
st.subheader("πŸ”Ή Common Algorithms:")
st.markdown("""
- **K-Means Clustering** β†’ Groups data into clusters
- **Hierarchical Clustering** β†’ Builds a tree of clusters
- **DBSCAN** β†’ Density-based clustering
- **PCA (Principal Component Analysis)** β†’ Reduces dimensionality
""")
st.subheader("πŸ› οΈ Use Cases:")
st.markdown("""
- Customer segmentation
- Market basket analysis
- Anomaly detection
""")
if st.button("πŸ”€ Go to ML Algorithms App"):
st.markdown("[Click here](https://huggingface.co/spaces/sree4411/ML_ALGORITHMS)")
st.markdown("---")
st.caption("Made with ❀️ using Streamlit β€” for educational ML projects")