Meghana-16/Machine_Learning_Algorithms
0
1import streamlit as st2 3# Title4st.markdown("<h2>What is ML Algorithm?</h2>", unsafe_allow_html=True)5st.markdown("A Machine Learning algorithm is a set of instructions that helps a computer learn from data and make predictions or decisions.", unsafe_allow_html=True)6 7# Basic Steps8st.markdown("<h3>Basic steps</h3>", unsafe_allow_html=True)9st.markdown("1. While guiding the machine, the main guidance comes from how we preprocess our data and choose the algorithm.", unsafe_allow_html=True)10st.markdown("2. If we preprocess the data incorrectly and choose the wrong algorithm, it leads to bad model performance.", unsafe_allow_html=True)11st.markdown("3. Inside the algorithm, there will be steps that the machine must follow while learning.", unsafe_allow_html=True)12 13# Based on the Algorithm14st.markdown("<h3>Based on the Algorithm</h3>", unsafe_allow_html=True)15st.markdown("1. Identify whether the algorithm is Supervised, Unsupervised, Semi-supervised, or Reinforcement Learning." ,unsafe_allow_html=True)16st.markdown("2. If we choose Supervised Learning, we must decide between Classification or Regression based on the problem and data.", unsafe_allow_html=True)17 18# Preprocessing Steps19st.markdown("<h3>Basic Steps Before Training</h3>", unsafe_allow_html=True)20st.markdown("1. When working with preprocessed tabular data, identify the feature variables and class variables.", unsafe_allow_html=True)21st.markdown("**Example:**Iris Dataset", unsafe_allow_html=True)22st.markdown("Feature Variables:Sepal Length, Sepal Width, Petal Length, Petal Width", unsafe_allow_html=True)23st.markdown("Class Variable: Species", unsafe_allow_html=True)24st.markdown("2. Divide the entire data into feature variables and class variables.", unsafe_allow_html=True)25st.markdown("3. Now split the data into Training Set (DTrain) and Test Set (DTest).", unsafe_allow_html=True)26 27# Conditions for splitting28st.markdown("<h3>Conditions</h3>", unsafe_allow_html=True)29st.markdown("1. Majority of the data should be in DTrain.", unsafe_allow_html=True)30st.markdown("2. Minority of the data should be in DTest.", unsafe_allow_html=True)31st.markdown("3. Common splits are 80:20, 70:30, or 60:40.", unsafe_allow_html=True)32st.markdown("4. No single data point should be in both DTrain and DTest.", unsafe_allow_html=True)33st.markdown("5. The split should be random, without replacement.", unsafe_allow_html=True)34st.markdown("6. Each data point should have an equal probability of selection.", unsafe_allow_html=True)35 36 37 