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")