0% found this document useful (0 votes)
3 views2 pages

Lecture Notes - Introduction To Machine Learning

This lecture introduces machine learning fundamentals, covering types of learning, key algorithms like linear and logistic regression, and evaluation metrics. It is aimed at undergraduate students in CS 101 and emphasizes the importance of machine learning in modern AI applications. Understanding these basics is essential for progressing to advanced topics such as neural networks and deep learning.

Uploaded by

explodingyogurt
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Lecture Notes - Introduction To Machine Learning

This lecture introduces machine learning fundamentals, covering types of learning, key algorithms like linear and logistic regression, and evaluation metrics. It is aimed at undergraduate students in CS 101 and emphasizes the importance of machine learning in modern AI applications. Understanding these basics is essential for progressing to advanced topics such as neural networks and deep learning.

Uploaded by

explodingyogurt
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lecture Notes: Introduction to Machine Learning

Professor Alex Rivera

October 15, 2025

Abstract

This lecture provides an overview of machine learning fundamentals, including

types of learning, key algorithms, and evaluation metrics. Designed for introductory

undergraduate students in CS 101.

1 What is Machine Learning?

Machine learning (ML) is a subset of artificial intelligence where systems learn from data
to make predictions or decisions without explicit programming. Arthur Samuel defined
it as giving computers the ability to learn without being explicitly programmed.
Key components include data, models, and learning algorithms. The goal is to gen-
eralize from training data to unseen data.

2 Types of Machine Learning

• Supervised Learning: Labeled data; regression (continuous output) and classifica-


tion (categorical output).

• Unsupervised Learning: Unlabeled data; clustering (e.g., K-means) and dimension-


ality reduction (e.g., PCA).

• Reinforcement Learning: Agent learns via rewards and penalties in an environment.

• Semi-supervised and Self-supervised: Combinations using limited labeled data.

1
University of Exemplar CS 101: Introduction to Machine Learning

3 Linear Regression

A fundamental supervised algorithm. Model: y = β0 + β1 x + ϵ.


Objective: Minimize mean squared error (MSE):

1∑
n
J(β) = (yi − ŷi )2
n i=1

Solved via gradient descent or normal equations.

4 Logistic Regression

For binary classification. Uses sigmoid function:

1
σ(z) =
1 + e−z

Loss function: binary cross-entropy. Interpretable and serves as a baseline for many
tasks.

5 Evaluation Metrics

• Regression: MSE, RMSE, MAE, R2 .

• Classification: Accuracy, Precision, Recall, F1-score, ROC-AUC.

Overfitting vs. underfitting addressed via cross-validation.

6 Conclusion

Machine learning forms the backbone of modern AI applications. Understanding these


basics prepares students for advanced topics like neural networks and deep learning.

Common questions

Powered by AI

Generalization to unseen data is crucial because it ensures that the model's performance is not limited to the specific data it was trained on, but can also effectively handle new and diverse datasets. This quality is vital for practical applications where newly encountered data must be accurately processed, aiding in adaptable and reliable decision-making processes .

In regression tasks, RMSE (Root Mean Squared Error) measures the average magnitude of prediction errors, giving an absolute scale to performance. For classification tasks, ROC-AUC (Receiver Operating Characteristic - Area Under Curve) assesses the ability of a model to distinguish between classes, capturing the trade-off between true positive and false positive rates across various thresholds, providing a performance summary over the classification task .

Binary cross-entropy is fitting for logistic regression as it quantifies the dissimilarity between the true label distribution and the predicted probabilities derived from the logistic model. This loss function effectively captures the penalty associated with deviations from the correct class prediction, thereby optimizing the logistic regression model towards higher classification accuracy in binary tasks .

Cross-validation divides the data into multiple subsets and iteratively trains and validates the model over these folds, ensuring the training is comprehensive and the model's predictive prowess is not confined to the idiosyncrasies of a single dataset partition. This repetitive validation helps in assessing and fine-tuning the model's ability on independent datasets, thereby reducing chances of overfitting .

Gradient descent is an optimization algorithm used to minimize the loss function, such as mean squared error in linear regression, by iteratively adjusting model parameters (e.g., coefficients) in the opposite direction of the gradient of the loss function. This helps in finding parameter values that best fit the model to the data through convergence, enabling effective prediction of continuous outcomes .

Semi-supervised learning benefits from leveraging both labeled and unlabeled data, thus reducing the dependency on large volumes of labeled data, which can be expensive or time-consuming to acquire. The model can learn natural patterns from the unlabeled data and refine predictions with limited labeled data. However, the effectiveness depends on assumptions about the data distribution and can be challenging if the underlying distribution does not support this hybridized approach .

Reinforcement learning involves an agent learning through interactions with an environment, receiving rewards or penalties based on actions taken, with the objective of maximizing cumulative reward. This contrasts with supervised and unsupervised learning, as it specifically involves feedback in the form of reinforcement signals rather than explicit labels or structure-seeking. This dynamic learning approach suits situations where data is not static or pre-labeled .

Linear regression is used for predicting continuous outcomes, represented by the equation y = β0 + β1x + ϵ, and aims to minimize mean squared error (MSE) through techniques like gradient descent. Logistic regression, on the other hand, is employed for binary classification tasks and utilizes the sigmoid function to predict probabilities, with the binary cross-entropy loss function guiding model training .

Overfitting and underfitting can be mitigated through techniques including cross-validation, which helps ensure that models generalize well to unseen data by validating performance across multiple subsets of the training data. Regularization methods, such as L2 or L1 (Ridge and Lasso regression), can also help to constrain model complexity and enhance generalization .

Supervised learning uses labeled data to predict outcomes and is involved in tasks such as regression for continuous outputs and classification for categorical outputs. In contrast, unsupervised learning works with unlabeled data, focusing on discovering patterns or structures within the dataset, such as clustering groups of data points (e.g., K-means) or reducing the dimensionality of data (e.g., PCA).

You might also like