Think Forward.

ML Tutorials

12388
Chapters: 4 4.4 min read

1: [ML Tutorials #1] Grasping the concept of machine learning in just 90 seconds of reading 3339

Machine learning is a branch of the artificial intelligence domain that encompasses various methods relying on learning from data to solve problems such as prediction, classification, dimensionality reduction, etc. Learning from the data means that machine learning systems can analyze patterns, extract insights, and make informed decisions without being explicitly programmed for a particular task. Instead of adhering to predetermined rules, machine learning methods adapt and improve their performance over time. The process involves training models, validating their accuracy, and testing their generalization to new, unseen data. Intuitively, we can envision the machine learning model as a student in a classroom. The teacher imparts knowledge to the student during what we refer to as the training step for the machine learning model. After the session, the student undergoes a quiz to solidify the concepts, representing the validation step for the machine learning model. Finally, the student takes a comprehensive final exam to test their understanding of the entire course. All of these stages occur gradually over what is termed as epochs in the context of a machine learning model. In this analogy, each epoch corresponds to a complete cycle of the training, validation, and testing phases. It's like the student attending multiple class sessions, quizzes, and exams to reinforce and assess their knowledge. With each successive epoch, the machine learning model refines its understanding of the data, enhancing its ability to make accurate predictions or classifications in real-world applications. Just as a student becomes more adept through repeated study sessions, the machine learning model becomes increasingly proficient with each pass through the data.

2: [ML Tutorials #2] "Understanding Overfitting and Underfitting in a Quick 90-Second Read" 2924

Overfitting and underfitting represent two common issues in machine learning that affect the performance of a model. In the context of overfitting, the model learns the training data too precisely, capturing noise and fluctuations that are specific to the training set but do not generalize well to new, unseen data. Underfitting, on the other hand, occurs when a model is enabled to capture the underlying patterns in the training data, resulting in poor performance not only on the training set but also on new, unseen data. It indicates a failure to learn the complexities of the data. **Analogy : ** Intuitively, returning to the example of the student that we presented in the definition of the machine learning concept, we discussed the possibility of considering a machine learning model as a student in a class. After the lecture phase, equivalent to the training step for the model, the student takes an exam or quiz to confirm their understanding of the course material. Now, imagine a student who failed to comprehend anything during the course and did not prepare. On the exam day, this student, having failed to grasp the content, will struggle to answer and will receive a low grade; this represents the case of underfitting in machine learning. On the other hand, let's consider another student who, despite having a limited understanding of the course, mechanically memorized the content and exercises. During the exam, when faced with questions reformulated or presented in a new manner, this student, having learned without true comprehension, will also fail due to the inability to adapt, illustrating the case of overfitting in machine learning. This analogy between a machine learning model and a student highlights the insightful parallels of underfitting and overfitting. Just as a student can fail by not grasping the course or memorizing without true understanding, a model can suffer from underfitting if it's too simple to capture patterns or overfitting if it memorizes the training data too precisely. Striking the right balance between complexity and generalization is crucial for developing effective machine learning models adaptable to diverse and unknown data. In essence, this educational analogy emphasizes the delicate equilibrium required in the machine learning learning process.

3: [ML Tutorials #3] Four keys to create supervised learning model 3280

Supervised learning is a strategy in machine learning that enables a model to learn from data without being explicitly programmed. In other words, in supervised learning, the model tries to find the relationship between the "input" X and the "output" Y. Therefore, the first key to creating a supervised learning model is the dataset. **Key 1 : Dataset** Having a labeled dataset is essential, including two important types of information: the target variable Y, which is what we want to predict, and the explanatory variable X, which are the factors that help us make predictions. Let's take an example: imagine we want our model to predict the weather (Y) based on factors like temperature, humidity, and wind speed (X). To do this, we gather a dataset with information from the past, where we already know both the weather outcomes (Y) and the corresponding factors (X). This dataset acts like a box of puzzle pieces. Each piece represents one of the factors, and finding the relationship between these pieces defines the weather. We can represent this relationship as a mathematical equation, like this: Y = F(X), where F represents our model. Therefore, the second key is the Model. **Key 2: Model** The fundamental model in supervised machine learning is a linear model expressed as y = ax + b. However, the real world often presents nonlinear problems. In such cases, we explore non-linear models, such as a polynomial of degree two like y = ax² + bx + c, or even of degree three, and beyond. It's crucial to understand that each model has parameters requiring adjustment during training. Consequently, the two remaining critical components are the cost function and the optimization algorithm. **Key 3 : Cost Function** In machine learning, a cost function, also called a loss or objective function, quantifies the gap between the target and predicted values, signifying the model's error. The aim is to minimize this error to craft the most effective model. **Key 4 : Optimizer** Optimizer forms the core of a machine learning model, representing the strategy to discover parameter values that minimize the cost function. It plays a crucial role in fine-tuning the model for optimal performance.

4: [ML Tutorials #4] "Supervised and Unsupervised Learning in 90 Seconds of Reading" 2845

** Brief Definition : ** Supervised and unsupervised learning are two fundamental facets of machine learning, each specifically tailored to handle distinct types of data. In supervised learning, the machine learning algorithm is trained on a labeled dataset, where each data point consists of both input features and corresponding output labels. The goal is for the algorithm to learn the mapping from inputs to outputs based on these labeled examples. In unsupervised learning, the machine learning algorithm is trained on an unlabeled dataset to find hidden patterns, structures, or relationships within the data. Unlike supervised learning, there are no predefined output labels for the algorithm to learn from. ** Intuition 🙂 : ** In supervised learning, envision having a jigsaw puzzle featuring a picture of a dog, where each puzzle piece is labeled with its correct position in the completed picture. The model learns from these labeled examples, figuring out the relationships between the shapes and colors of the pieces and their correct locations.This process, often referred to as the training step, allows the model to internalize the patterns within the labeled data. Subsequently, after training, the model is adept at taking a new puzzle of a dog and precisely assembling it based on the knowledge acquired during the training process. Now, imagine you have a bag of puzzle pieces without a picture or labels — just a mix of colors and shapes. In unsupervised learning, the model explores the characteristics of the puzzle pieces without any predefined labels or information about the complete picture, identifying groups that share similar colors, shapes, or patterns. The model doesn't know what the complete picture looks like, but it discovers that certain pieces belong together based on shared features. These groups represent clusters of similar puzzle pieces. In this puzzle analogy, supervised learning entails constructing a model with labeled examples to tackle a specific task, while unsupervised learning involves the model autonomously uncovering patterns or relationships within the data without explicit direction.