0% found this document useful (0 votes)
17 views

What Is Machine Learning

Uploaded by

chessyrohan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

What Is Machine Learning

Uploaded by

chessyrohan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

what is machine learning

Machine learning is a branch of artificial intelligence (AI) that enables systems to


automatically learn and improve from experience without being explicitly
programmed.

Features of Machine Learning:


• Machine learning uses data to detect various patterns in a given
dataset.
• It can learn from past data and improve automatically.
• It is a data-driven technology.
• Machine learning is much similar to data mining as it also deals with
the huge amount of the data.

How does Machine Learning work


A ML system builds prediction models, learns from previous data, and predicts the
output of new data whenever it receives it.
The amount of data helps to build a better model that accurately predicts the
output, which in turn affects the accuracy of the predicted output.

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

Regression vs. Classification in Machine Learning


discuss briefly Finding the best fit line or performance evaluation

• 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

discuss briefly the evaluation of a classification model as per the file

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.

Types of Unsupervised Learning

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

How does a machine learning system work?


A machine learning (ML) system works through several key stages:
1. Data Collection: The system gathers relevant data from various sources.
This data will serve as the foundation for learning.
2. Data Preparation and Wrangling: The collected data is cleaned,
structured, and transformed to ensure it is in a usable format, which includes
handling missing or duplicate values and selecting appropriate variables.
3. Data Analysis: Various analytical techniques are applied to understand the
data. This includes choosing ML methods (e.g., classification, regression)
and building initial models.
4. Training the Model: The ML model is trained on this data to learn from
past examples, adjusting its parameters to improve accuracy in making
predictions or identifying patterns.
5. Testing the Model: The model is tested on a separate set of data to assess its
accuracy and performance.
6. Deployment: If the model meets performance requirements, it is deployed to
a real-world system where it continuously makes predictions on new data.
Why do we need Data Preprocessing?
Data preprocessing is essential because real-world data often contains noise,
missing values, and inconsistencies, making it unsuitable for direct use in machine
learning models. Preprocessing cleans and transforms this data to improve the
accuracy and efficiency of the model. It involves several key steps, such as
handling missing data, encoding categorical variables, splitting data into training
and test sets, and feature scaling. These steps help ensure that the model performs
well and generalizes effectively on new data
What is Overfitting?
Overfitting happens when a model learns the training data too well, including its noise, leading to poor
performance on new data. This results in high accuracy on the training set but low accuracy on the test
set, indicating poor generalization. To prevent overfitting, techniques like early stopping, cross-validation,
and regularization are commonly used
how to detect overfitting?
To detect overfitting in machine learning, you can compare the model’s performance on training and
testing datasets. If a model performs well on the training data but poorly on the test data, it’s a clear
indication of overfitting. For instance, if a model shows 85% accuracy on the training dataset but only
50% accuracy on the test dataset, it has likely memorized the training data rather than learning
generalizable patterns

how to prevent overfitting?


• Early Stopping: Stop training when performance on a validation set stops improving, to
prevent the model from learning noise.
• Train with More Data: Providing a larger, clean dataset helps the model generalize better.
• Feature Selection: Retain only the most relevant features to reduce complexity and noise.
• Cross-Validation: Use techniques like k-fold cross-validation to ensure the model performs
well across different subsets of data.
• Data Augmentation: Create modified versions of existing data, especially useful in image
data, to increase diversity.
• Regularization: Apply methods like L1 or L2 regularization to penalize complex models,
discouraging overfitting by simplifying the mode

Are machine learning models, and algorithms are thes ame?


According to the file, a machine learning algorithm is a procedure or method
applied to data to identify patterns and produce a model. On the other hand, a
machine learning model is the resulting program that, once trained with data
through the algorithm, can make predictions or generate outputs based on
new data
Evaluating a Classification Model
1.Log loss and cross entropy

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

You might also like