<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Machine Learning | Yuchao's Personal Website</title><link>https://yuchaosu.com/tags/machine-learning/</link><atom:link href="https://yuchaosu.com/tags/machine-learning/index.xml" rel="self" type="application/rss+xml"/><description>Machine Learning</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Sun, 05 Oct 2025 00:00:00 +0000</lastBuildDate><image><url>https://yuchaosu.com/media/icon_hu_982c5d63a71b2961.png</url><title>Machine Learning</title><link>https://yuchaosu.com/tags/machine-learning/</link></image><item><title>机器学习(一)（Machine Learning I）</title><link>https://yuchaosu.com/post/mli/</link><pubDate>Sun, 05 Oct 2025 00:00:00 +0000</pubDate><guid>https://yuchaosu.com/post/mli/</guid><description>&lt;h2 id="overview-of-machine-learning">Overview of Machine Learning&lt;/h2>
&lt;p>The beginning of machine learning can be traced back to the 1950s when Arthur Samuel, a pioneer in the field of artificial intelligence, developed a program that could play checkers and improve its performance over time through experience. Since then, machine learning has evolved significantly, with advancements in algorithms, computing power, and the availability of large datasets.&lt;/p>
&lt;p>Machine learning mainly work on the performance of a specific task on computer system and the optimization of algorithms to improve that performance over time.The Machine Learning system use giant amount of data to learn and make predictions or decisions without being explicitly programmed for every possible scenario.
&lt;figure id="figure-machine-learning">
&lt;div class="flex justify-center ">
&lt;div class="w-full" >
&lt;img alt="Machine Learning"
srcset="https://yuchaosu.com/post/mli/overview_hu_bc4fc7173d3dadfc.webp 320w, https://yuchaosu.com/post/mli/overview_hu_5b8e9dfb34f764f7.webp 480w, https://yuchaosu.com/post/mli/overview_hu_d409860e83ec619b.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://yuchaosu.com/post/mli/overview_hu_bc4fc7173d3dadfc.webp"
width="760"
height="380"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Machine Learning
&lt;/figcaption>&lt;/figure>
&lt;/p>
&lt;h3 id="difference-between-ai-machine-learning-and-deep-learning">Difference between AI, Machine Learning, and Deep Learning&lt;/h3>
&lt;p>
&lt;figure id="figure-ai-vs-machine-learning-vs-deep-learning">
&lt;div class="flex justify-center ">
&lt;div class="w-full" >
&lt;img alt="AI vs Machine Learning vs Deep Learning"
srcset="https://yuchaosu.com/post/mli/compare_hu_ffa7f6cc8ad3046b.webp 320w, https://yuchaosu.com/post/mli/compare_hu_78bcdf7cf6406a1f.webp 480w, https://yuchaosu.com/post/mli/compare_hu_4828451a02fb3c80.webp 696w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://yuchaosu.com/post/mli/compare_hu_ffa7f6cc8ad3046b.webp"
width="696"
height="522"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
AI vs Machine Learning vs Deep Learning
&lt;/figcaption>&lt;/figure>
&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Artificial Intelligence (AI): AI is a broad field of computer science that focuses on creating systems capable of performing tasks that typically require human intelligence. This includes problem-solving, reasoning, learning, and understanding natural language. AI encompasses various techniques, including rule-based systems, expert systems, and machine learning.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Machine Learning (ML): ML is a subset of AI that focuses on developing algorithms and statistical models that enable computers to learn from and make predictions or decisions based on data. Instead of being explicitly programmed for every task, ML systems improve their performance over time as they are exposed to more data. Common ML techniques include supervised learning, unsupervised learning, and reinforcement learning.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Deep Learning (DL): DL is a specialized subset of ML that uses neural networks with many layers (deep networks) to analyze various factors of data. DL has gained popularity due to its success in tasks such as image and speech recognition, natural language processing, and game playing. It requires large amounts of data and significant computational power to train deep neural networks effectively.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="history-of-machine-learning">History of Machine Learning&lt;/h3>
&lt;ul>
&lt;li>1950-1970: &lt;strong>Alan Turing&lt;/strong> proposed the concept of a machine that could simulate human intelligence. &lt;strong>Frank Rosenblatt&lt;/strong> developed the Perceptron, an early neural network model. &lt;strong>Arthur Samuel&lt;/strong> developed a checkers-playing program that improved through experience.&lt;/li>
&lt;li>1970-1980: &lt;strong>Knowledge-based systems and expert systems gained popularity.&lt;/strong> The backpropagation algorithm for training neural networks was introduced.
Expert systems are AI programs that mimic the decision-making abilities of a human expert in a specific domain. They use a set of rules and knowledge bases to provide solutions or recommendations based on input data. It is often a knowledge-driven approach, represented as &amp;ldquo;if-then&amp;rdquo; rules. &lt;strong>Decision trees&lt;/strong> are introduced as a simple yet effective machine learning algorithm for classification and regression tasks. Besides, &lt;strong>Bayesian theorem&lt;/strong> start to be used in machine learning for probabilistic inference and decision-making.&lt;/li>
&lt;li>1980-2000: &lt;strong>Data driven and statistical methods became more prominent.&lt;/strong> Decision trees are evolved into more advanced algorithms like C4.5. &lt;strong>Support Vector Machines (SVMs)&lt;/strong> were introduced for classification tasks. &lt;strong>Unsupervised learning techniques like clustering and K-means&lt;/strong> gained attention. Random forests and ensemble methods were developed to improve predictive performance.&lt;/li>
&lt;li>2000-2020: &lt;strong>As the computing power increased and big data became more available, machine learning experienced significant growth.&lt;/strong> Machine learning break the performance bottleneck of image, voice and text.
was introduced.
, a deep CNN, won the ImageNet competition in 2012, marking a significant milestone in deep learning.
were introduced for generating realistic data. &lt;strong>AIGC&lt;/strong>(Artificial Intelligence Generated Content) became a hot topic. &lt;strong>Reinforcement learning&lt;/strong> gained attention with successes like AlphaGo defeating human champions in the game of Go.
were introduced in 2017, revolutionizing natural language processing tasks.&lt;/li>
&lt;li>2020-Present: Large language models (LLMs) like GPT-3, GPT-4 and BERT have demonstrated impressive capabilities in natural language understanding and generation. Multi-modal techniques have emerged, allowing models to process and generate content across different modalities (e.g., text, image, audio). CLIP from OpenAI and Gato from Google DeepMind has shown the potential of combining vision and language. Generalized machine learning techniques have emerged, including &lt;strong>Self-supervised learning&lt;/strong>, which has gained traction, allowing models to learn from unlabeled data. This work significantly reduce the labor of labeling data. &lt;strong>Federated learning&lt;/strong> has emerged as a way to train models across decentralized devices while preserving data privacy. &lt;strong>Explainable AI (XAI)&lt;/strong> has become a focus to enhance transparency and interpretability of machine learning models.&lt;/li>
&lt;/ul>
&lt;h3 id="machine-learning-applications">Machine Learning Applications&lt;/h3>
&lt;p>Machine learning has a wide range of applications across various industries and domains. Some common applications include:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Image and Speech Recognition&lt;/strong>: Machine learning algorithms are used in facial recognition systems, voice assistants (e.g., Siri, Alexa), and image classification tasks.&lt;/li>
&lt;li>&lt;strong>Natural Language Processing (NLP)&lt;/strong>: Machine learning is used in language translation, sentiment analysis, chatbots, and text generation.&lt;/li>
&lt;li>&lt;strong>Recommendation Systems&lt;/strong>: Platforms like Netflix, Amazon, and Spotify use machine learning to recommend products, movies, or music based on user preferences and behavior.&lt;/li>
&lt;li>&lt;strong>Healthcare&lt;/strong>: Machine learning is used for medical image analysis, disease diagnosis, drug discovery, and personalized treatment recommendations. It is also used in protein and virus structure design, such as AlphaFold from DeepMind.&lt;/li>
&lt;li>&lt;strong>Finance&lt;/strong>: Machine learning is used for fraud detection, algorithmic trading, credit scoring, and risk assessment.&lt;/li>
&lt;/ul>
&lt;h3 id="machine-learning-terminology">Machine Learning Terminology&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Dataset&lt;/strong>: A collection of data used for training and evaluating machine learning models. It typically consists of input features and corresponding labels or target values.
&lt;ul>
&lt;li>&lt;strong>Training Set&lt;/strong>: A subset of the dataset used to train a machine learning model. The model learns patterns and relationships from this data.&lt;/li>
&lt;li>&lt;strong>Validation Set&lt;/strong>: A subset of the dataset used to tune hyperparameters and evaluate the model&amp;rsquo;s performance during training.&lt;/li>
&lt;li>&lt;strong>Test Set&lt;/strong>: A subset of the dataset used to assess the final performance of a trained machine learning model on unseen data.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>Model&lt;/strong>: A mathematical representation of a system or process that is trained to make predictions or decisions based on input data.&lt;/li>
&lt;li>&lt;strong>Sample&lt;/strong>: An individual data point or instance in a dataset, consisting of input features and corresponding labels or target values.&lt;/li>
&lt;li>&lt;strong>Feature&lt;/strong>: An individual measurable property or characteristic of the data used as input to a machine learning model.&lt;/li>
&lt;li>&lt;strong>Feature Vector&lt;/strong>: A vector that represents the features of a sample in a dataset. It is typically a numerical representation of the input data.&lt;/li>
&lt;li>&lt;strong>Label&lt;/strong>: The target variable or output that a machine learning model aims to predict or classify.&lt;/li>
&lt;li>&lt;strong>Training&lt;/strong>: The process of feeding a machine learning model with labeled data to learn patterns and relationships.&lt;/li>
&lt;li>&lt;strong>Testing&lt;/strong>: The process of evaluating a trained machine learning model on unseen data to assess its performance.&lt;/li>
&lt;li>&lt;strong>Overfitting&lt;/strong>: A situation where a machine learning model performs well on the training data but poorly on unseen data, indicating that it has learned noise or irrelevant patterns.&lt;/li>
&lt;li>&lt;strong>Underfitting&lt;/strong>: A situation where a machine learning model fails to capture the underlying patterns in the training data, resulting in poor performance on both training and unseen data.&lt;/li>
&lt;li>&lt;strong>Cross-validation&lt;/strong>: A technique used to assess the performance of a machine learning model by dividing the dataset into multiple subsets and training/testing the model on different combinations of these subsets.&lt;/li>
&lt;li>&lt;strong>Hyperparameters&lt;/strong>: Parameters that are set before training a machine learning model and control its learning process (e.g., learning rate, number of layers).&lt;/li>
&lt;li>&lt;strong>Parameters&lt;/strong>: Internal variables of a machine learning model that are learned during the training process (e.g., weights in a neural network).&lt;/li>
&lt;li>&lt;strong>Loss Function&lt;/strong>: A mathematical function that quantifies the difference between the predicted output of a machine learning model and the actual target values. The goal of training is to minimize the loss function.&lt;/li>
&lt;li>&lt;strong>Gradient Descent&lt;/strong>: An optimization algorithm used to minimize the loss function by iteratively adjusting the model&amp;rsquo;s parameters in the direction of the steepest descent of the loss function.&lt;/li>
&lt;li>&lt;strong>Epoch&lt;/strong>: A complete pass through the entire training dataset during the training process.&lt;/li>
&lt;li>&lt;strong>Batch Size&lt;/strong>: The number of training examples used in one iteration of training. It determines how many samples are processed before the model&amp;rsquo;s parameters are updated.&lt;/li>
&lt;li>&lt;strong>Learning Rate&lt;/strong>: A hyperparameter that controls the step size at which the model&amp;rsquo;s parameters are updated during training. A too high learning rate can lead to divergence, while a too low learning rate can result in slow convergence.&lt;/li>
&lt;li>&lt;strong>Activation Function&lt;/strong>: A mathematical function applied to the output of a neuron in a neural network to introduce non-linearity. Common activation functions include ReLU, sigmoid, and tanh.&lt;/li>
&lt;li>&lt;strong>Quantization&lt;/strong>: The process of reducing the precision of the numbers used to represent a model&amp;rsquo;s parameters, typically to decrease the model size and improve inference speed. Common quantization techniques include 8-bit integer quantization and 16-bit floating-point quantization.&lt;/li>
&lt;/ul>
&lt;!-- ### Some Current Machine Learning Experts
- **Yann LeCun** Father of Convolutional Neural Networks (CNNs) and Deep Learning
- **Andrew Ng** Co-founder of Google Brain and Coursera
- **Geoffrey Hinton** Pioneer of Deep Learning and Neural Networks
- **Fei-Fei Li** Expert in Computer Vision and AI Ethics. Raise the ImageNet project
- **Ian Goodfellow** Inventor of Generative Adversarial Networks (GANs)
- **Pedro Domingos** Author of "The Master Algorithm"
- **Kaiming He** Co-inventor of ResNet -->
&lt;h2 id="basic-rules-of-machine-learning">Basic Rules of Machine Learning&lt;/h2>
&lt;h3 id="basic-components-of-machine-learning">Basic Components of Machine Learning&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">Machine Learning = Model + Strategy + Algorithm
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>&lt;strong>Model&lt;/strong>: A mathematical representation of a system or process that is trained to make predictions or decisions based on input data.&lt;/li>
&lt;li>&lt;strong>Strategy&lt;/strong>: The approach or method used to train and evaluate a machine learning model, such as supervised learning, unsupervised learning, or reinforcement learning.&lt;/li>
&lt;li>&lt;strong>Algorithm&lt;/strong>: A set of rules or procedures used to solve a specific problem or perform a specific task, such as linear regression, decision trees, or neural networks.
Data is also a very important part of machine learning. But data is not a part of machine learning itself. Data is the input to machine learning. The quality and quantity of data can significantly impact the performance of a machine learning model.&lt;/li>
&lt;/ul>
&lt;h3 id="classification-of-machine-learning">Classification of Machine Learning&lt;/h3>
&lt;p>Basically, machine learning can be classified into three main categories:
&lt;figure id="figure-types-of-machine-learning">
&lt;div class="flex justify-center ">
&lt;div class="w-full" >
&lt;img alt="Types of Machine Learning"
srcset="https://yuchaosu.com/post/mli/supervsunsupervsrein_hu_51260bb8b3e9b0c5.webp 320w, https://yuchaosu.com/post/mli/supervsunsupervsrein_hu_ffc1976d3d5c52b4.webp 480w, https://yuchaosu.com/post/mli/supervsunsupervsrein_hu_b89ab5c7557fd566.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://yuchaosu.com/post/mli/supervsunsupervsrein_hu_51260bb8b3e9b0c5.webp"
width="760"
height="496"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Types of Machine Learning
&lt;/figcaption>&lt;/figure>
&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Supervised Learning&lt;/strong>: The model is trained on &lt;strong>labeled data&lt;/strong>, where the input features and corresponding labels are provided. The goal is to learn a &lt;strong>mapping&lt;/strong> from inputs to outputs. Examples include regression and classification tasks. Similarity learning can be considered as a combination of regression and classification. Its target is to learn the similarity between two inputs. It use similarity function to measure the distance(similarity, relevance) between two inputs. It is widely used in recommendation systems, facial recognition, and information retrieval.&lt;/li>
&lt;li>&lt;strong>Unsupervised Learning&lt;/strong>: The model is trained on &lt;strong>unlabeled data&lt;/strong>, where only the input features are provided. The goal is to &lt;strong>discover patterns or structures&lt;/strong> in the data. Examples include clustering and dimensionality reduction.&lt;/li>
&lt;li>&lt;strong>Half-supervised Learning&lt;/strong>: The model is trained on a combination of &lt;strong>labeled&lt;/strong> and &lt;strong>unlabeled data&lt;/strong>. This approach can be useful when labeled data is scarce or expensive to obtain.&lt;/li>
&lt;li>&lt;strong>Reinforcement Learning&lt;/strong>: The model learns to make decisions by interacting with &lt;strong>an environment and receiving feedback in the form of rewards or penalties.&lt;/strong> The goal is to learn a policy that maximizes the cumulative reward over time.&lt;/li>
&lt;/ul>
&lt;p>We can also classify machine learning based on the type of model used, such as:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Linear Models&lt;/strong>: These models make predictions based on a linear combination of input features. Examples include linear regression and logistic regression.&lt;/li>
&lt;li>&lt;strong>Probabilistic Models&lt;/strong>: These models use probability theory to make predictions and quantify uncertainty. Examples include Bayesian networks and hidden Markov models.&lt;/li>
&lt;/ul>
&lt;h3 id="modeling-process">Modeling Process&lt;/h3>
&lt;p>Using supervised learning as an example, the modeling process typically involves the following steps:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;strong>Data Collection&lt;/strong>: Gather a dataset that includes input features and corresponding labels. This dataset will be used for training and evaluating the model.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Data Preprocessing&lt;/strong>: Clean and preprocess the data to ensure its quality. This may involve handling missing values, normalizing or scaling features, and encoding categorical variables.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Feature Selection/Engineering&lt;/strong>: Identify the most relevant features for the task at hand. This may involve creating new features from existing ones or selecting a subset of features to improve model performance.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Model Selection&lt;/strong>: Choose an appropriate machine learning algorithm or model architecture based on the problem type and data characteristics. This could involve trying out different algorithms and comparing their performance.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Training&lt;/strong>: Train the selected model on the training dataset by feeding it the input features and corresponding labels. The model learns to map inputs to outputs during this phase.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Evaluation&lt;/strong>: Assess the model&amp;rsquo;s performance on a separate validation or test dataset. Common evaluation metrics include accuracy, precision, recall, F1-score, and area under the ROC curve (AUC-ROC).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Hyperparameter Tuning&lt;/strong>: Optimize the model&amp;rsquo;s hyperparameters to improve performance. This may involve techniques like grid search or random search to find the best combination of hyperparameters.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Deployment&lt;/strong>: Once the model is trained and evaluated, it can be deployed to a production environment where it can make predictions on new, unseen data.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;pre>
&lt;/pre>
&lt;p>&lt;em>From my point of view, we are trying to build the world by abstracting the real world into mathematical models. We use the vectors to represent the real world, and use the functions to represent the relationship between the vectors. Then based on theses vectors and functions, we can use some model to conclude the rules of the world. Then we can use these rules to predict the future or generate new things. In previous days, we need to explicitly define the rules of the world. But now, with the help of machine learning, we can let the computer learn the rules from the data. This is a big step forward in building the world. After decades of development, the machine learning model can describe the world in a black box way. We can use the model to predict the future or generate new things, but we don&amp;rsquo;t know how the model works inside. This is a big challenge for us. We need to find a way to understand the model better, and make it more explainable. This is the future direction of machine learning.(Interpretable Machine Learning) As the parameters of the model are increasing exponentially, (billion to trillion level) the interpretability of the model is becoming more and more challenging and important.&lt;/em>&lt;/p></description></item><item><title>机器学习数学基础（The Mathematical Foundations of Machine Learning）</title><link>https://yuchaosu.com/post/machinelearningmath/</link><pubDate>Wed, 24 Sep 2025 00:00:00 +0000</pubDate><guid>https://yuchaosu.com/post/machinelearningmath/</guid><description>&lt;h2 id="mathematical-foundations">Mathematical Foundations&lt;/h2>
&lt;h3 id="gradient">Gradient&lt;/h3>
&lt;p>Assume a function \( f(x_1, x_2, \ldots, x_n) \) with multiple variables. The gradient of this function is a vector that contains all its partial derivatives:
&lt;/p>
$$ \nabla f(x) = \left( \frac{\partial f}{\partial x_1}, \frac{\partial f}{\partial x_2}, \ldots, \frac{\partial f}{\partial x_n} \right) $$&lt;p>
&lt;strong>Process:&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>Compute the exact differential of the function \( f \):
$$ df = \frac{\partial f}{\partial x_1} dx_1 + \frac{\partial f}{\partial x_2} dx_2 + \ldots + \frac{\partial f}{\partial x_n} dx_n $$&lt;/li>
&lt;li>Create two vectors:
&lt;ul>
&lt;li>The vector of partial derivatives:
$$\boldsymbol{\alpha} = \left( \frac{\partial f}{\partial x_1}, \frac{\partial f}{\partial x_2}, \ldots, \frac{\partial f}{\partial x_n} \right) $$&lt;/li>
&lt;li>The vector of differentials:
$$ \mathbf{dx} = (dx_1, dx_2, \ldots, dx_n) $$&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>The exact differential can be expressed as the dot product of these two vectors:
$$ df = \boldsymbol{\alpha} \cdot \mathbf{dx} $$&lt;/li>
&lt;li>When we compute the vector dot product, we get:
$$ \boldsymbol{\alpha} \cdot \mathbf{dx} = |\boldsymbol{\alpha}| |\mathbf{dx}| \cos(\theta) $$
where \( \theta \) is the angle between the two vectors.&lt;/li>
&lt;li>The value of $|\mathbf{dx}|$ is fixed, representing a small change in the input variables. The value of \( \cos(\theta) \) varies between -1 and 1, depending on the angle between the two vectors. The maximum value of \( df \) occurs when \( \theta = 0 \), meaning the two vectors are aligned. In this case:
$$ df_{max} = |\boldsymbol{\alpha}| |\mathbf{dx}| $$
On the other word, the maximum rate of change of the function \( f \) occurs in the direction of the gradient vector \( \boldsymbol{\alpha} \).
This matches the original expression
The gradient is the combination of all partial derivatives. It points in the direction of the steepest ascent of the function. (Changes fastest in this direction)
Follow the &lt;strong>reversed&lt;/strong> gradient direction a little bit, then recompute the &lt;strong>reversed&lt;/strong> gradient, follow the new direction, and repeat. Then we can reach the &lt;strong>local minimum&lt;/strong> of the function. (Loss Function)&lt;/li>
&lt;/ol>
&lt;h3 id="norm">Norm&lt;/h3>
&lt;p>The norm of a vector is a measure of its length or magnitude.&lt;/p>
&lt;ul>
&lt;li>L0 norm: The L0 norm of a vector counts the number of non-zero elements in the vector. It is defined as:
$$ ||\mathbf{x}||_0 = \text{number of non-zero elements in } \mathbf{x} $$&lt;/li>
&lt;li>L1 norm: The L1 norm of a vector is the sum of the absolute values of its elements. Also known as Manhattan distance, it is defined as:
$$ ||\mathbf{x}||_1 = \sum_{i=1}^{n} |x_i| $$&lt;/li>
&lt;li>L2 norm: The L2 norm of a vector is the square root of the sum of the squares of its elements. Also known as the Euclidean norm, it is defined as:
$$ ||\mathbf{x}||_2 = \sqrt{\sum_{i=1}^{n} x_i^2} $$&lt;/li>
&lt;li>L-p norm: The L-p norm of a vector is a generalization of the L1 and L2 norms. It is defined as:
$$ ||\mathbf{x}||_p = \left( \sum_{i=1}^{n} |x_i|^p \right)^{1/p} $$
for any real number \( p \geq 1 \).&lt;/li>
&lt;li>L-infinity norm: The L-infinity norm of a vector is the maximum absolute value among its elements. It is defined as:
$$ ||\mathbf{x}||_\infty = \max_{1 \leq i \leq n} |x_i| $$&lt;/li>
&lt;/ul>
&lt;h3 id="probability">Probability&lt;/h3>
&lt;h4 id="independent-events">Independent events&lt;/h4>
$$ P(A \cap B) = P(A)P(B) $$&lt;p>
&lt;/p>
$$ P(A \cup B) = P(A) + P(B) - P(A)P(B) $$&lt;h4 id="conditional-probability">Conditional Probability&lt;/h4>
$$ P(A \cap B) = P(A|B)P(B) = P(B|A)P(A) $$&lt;p>
&lt;/p>
$$ P(A \cup B) = P(A) + P(B) - P(A \cap B) $$&lt;p>Check if two events are independent:
&lt;/p>
$$ P(A|B) = P(A) $$&lt;p> or
&lt;/p>
$$ P(B|A) = P(B) $$&lt;h4 id="bayes-theorem">Bayes&amp;rsquo; Theorem&lt;/h4>
&lt;ul>
&lt;li>
&lt;p>Prior probability vs Posterior probability:
Prior probability is the initial probability of an event before new evidence is considered. Posterior probability is the updated probability of an event after considering new evidence.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Full probability formula:
&lt;/p>
$$\begin{align*}
P(B) &amp;= P(A_1)P(B|A_1) + P(A_2)P(B|A_2) + \ldots \\
&amp;= \sum_{i} P(B|A_i)P(A_i)
\end{align*}$$&lt;/li>
&lt;li>
&lt;p>Bayes&amp;rsquo; Theorem:
&lt;/p>
$$ P(A_i|B) = \frac{P(B|A_i)P(A_i)}{P(B)} = \frac{P(B|A_i)P(A_i)}{\sum_{j} P(B|A_j)P(A_j)} $$&lt;p>
The usage of Bayes&amp;rsquo; theorem is to update the probability of an event based on new evidence. We can use the posterior probability to predict the likelihood of an event occurring given the new evidence.
Given the machine learning context, we can use the dataset as &amp;ldquo;B&amp;rdquo;, and the model parameters as &amp;ldquo;A&amp;rdquo;. Then we can use Bayes&amp;rsquo; theorem to update the model parameters based on the dataset.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h4 id="likelihood-function">Likelihood function&lt;/h4>
&lt;p>The likelihood function is a fundamental concept in statistics and machine learning. It is used to estimate the parameters of a statistical model given observed data. The likelihood function measures how likely it is to observe the given data for different values of the model parameters. On the other hand, the probability function measures the likelihood of observing a specific outcome given a set of parameters.&lt;/p>
&lt;p>In more common terms, the likelihood function is a function of the parameters of a statistical model, given the observed data. The input to the likelihood function is the model parameters, and the output is the likelihood of observing the data given those parameters.&lt;/p>
&lt;p>For example, suppose we have a statistical model that has a possible output 5. We only use two parameters x and y in the model. The likelihood function describes how likely it is to observe the output 5 for different values of x and y.&lt;/p>
&lt;p>Assume a statistical model with parameters \( \theta \) and observed data \( D \). The likelihood function \( L(\theta | D) \) is defined as the probability of observing the data given the parameters:
&lt;/p>
$$ L(\theta | D) = P(D | \theta) $$&lt;p>In machine learning, the likelihood function is often used in maximum likelihood estimation (MLE) to find the parameter values that maximize the likelihood of the observed data. This is done by finding the parameter values that make the observed data most probable.
The data fits independently and identically distributed (i.i.d.) assumption is often made, which means that the data points are assumed to be independent of each other and drawn from the same distribution. The distribution here can be considered as the machine learning model. We can use the likelihood function to find the best model parameters that fit the data.
Assume i.i.d. observations \( D = \{x_1, x_2, \ldots, x_n\} \). The likelihood function can be expressed as:
&lt;/p>
$$ L(\theta | D) = \prod_{i=1}^{n} P(x_i | \theta) $$&lt;p>
Since they are independent, the joint probability is the product of individual probabilities.
To simplify the computation, we often work with the log-likelihood function, which is the natural logarithm of the likelihood function:
&lt;/p>
$$ \ell(\theta | D) = \log L(\theta | D) = \sum_{i=1}^{n} \log P(x_i | \theta) $$&lt;p>
Maximizing the log-likelihood is equivalent to maximizing the likelihood due to the monotonic nature of the logarithm. It is often easier to work with the log-likelihood due to its additive properties.&lt;/p>
&lt;h4 id="maximum-likelihood-estimation-mle">Maximum Likelihood Estimation (MLE)&lt;/h4>
&lt;p>Maximum Likelihood Estimation (MLE) is a method used to estimate the parameters of a statistical model by maximizing the likelihood function. The goal of MLE is to find the parameter values that make the observed data most probable.
In machine learning, we only got the dataset, and we want to find the best model parameters that fit the data. We can use MLE to achieve this by finding the parameter values that maximize the likelihood of the observed data. On the other word, we want to find the model parameters that make the data most likely to be the data in the dataset.&lt;/p></description></item></channel></rss>