What Is Machine Learning
What Is Machine Learning
Applications:
• Online recommendation systems
• Search engine algorithms
• Image and speech recognition
• Email spam detection
• Customer segmentation
• Fraud detection
• Predictive maintenance
• Autonomous vehicles (self-driving cars)
• Virtual personal assistants (e.g., Siri, Alexa)
• Medical diagnosis and imaging
Key differences between Artificial Intelligence (AI) and Machine learning (ML):
• R-Squared (R²): This statistical measure assesses how well the model's predictions match
actual outcomes. R² values range from 0 to 1 (or 0% to 100%), with higher values indicating that
the model accurately predicts data points. It is commonly used in regression to measure the
strength of the relationship between dependent and independent variables(L-3 Machine
Learning).
• Mean Squared Error (MSE): For linear regression, MSE calculates the average of the
squared differences between predicted and actual values. A lower MSE suggests a better fit, as it
indicates smaller deviations from the predicted regression line(L-3 Machine Learning).
• Gradient Descent: This optimization algorithm iteratively adjusts the model’s parameters to
minimize MSE, helping to identify the best fit line by reducing prediction error over each
iteration
The evaluation of a classification model involves assessing its performance on various metrics to
ensure accuracy and reliability. Key evaluation metrics often used include:
1. Accuracy - The proportion of correct predictions out of the total predictions, showing the
overall effectiveness.
2. Precision - Measures how many positive predictions were actually correct, useful when
minimizing false positives is essential.
3. Recall (Sensitivity) - The ratio of true positives to actual positives, focusing on capturing
all relevant cases.
4. F1 Score - The harmonic mean of precision and recall, useful when there is an uneven
class distribution.
5. Confusion Matrix - A table summarizing true positives, false positives, true negatives,
and false negatives, providing a detailed error analysis.
what is unsupervised in ML
Unsupervised learning in machine learning is a type of learning where the model is trained on
data without labeled responses or predefined categories.
1. Clustering: Groups data points into clusters based on similarity. For example, customer
segmentation, where similar customer behaviors are grouped together.
2. Association: Finds relationships between data points. An example is market basket
analysis, where it determines products often bought together.
Key Algorithms
• K-means clustering
• Hierarchical clustering
• Principal Component Analysis (PCA)
• Association Rule Learning (e.g., Apriori algorithm)
Reinforcement Learning
Reinforcement learning (RL) is a type of machine learning where an agent learns
to make decisions by interacting with an environment. It works on a feedback-
based system, rewarding the agent for beneficial actions and penalizing it
Types of Reinforcement Learning:
1. Positive Reinforcement Learning: This type strengthens behavior by
adding a positive outcome after a desired action, making it more likely the
agent will repeat the behavior.
2. Negative Reinforcement Learning: In contrast, this method encourages
behavior by avoiding a negative outcome when the correct action is taken,
promoting behavior modification through deterrence of undesirable results.
Most Used Algorithm
Q-learning
Examples:
Machine playing PACMAN or other similar game.
Use Cases: Used in Robotics for Industrial Automation
Used to create training systems that provides custom
instruction and materials according to the requirements
of students
Log loss and cross-entropy are both metrics used to evaluate the performance of a classification
model by measuring the difference between the predicted probability distribution and the actual
distribution.
In binary classification tasks, the cross-entropy, often called binary cross-entropy, is the
average of cross-entropy values for all data samples. For two possible classes (e.g., 0 and 1),
binary cross-entropy can be expressed as:
2.Confusion Matrics