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