Machine Learning Course Notes
Machine Learning Course Notes
Decision trees function by making a series of binary decisions based on input data features, leading to a final prediction or decision. Each node in the tree represents a feature, and each branch represents a decision rule. They are commonly used in classification and regression tasks due to their straightforward interpretation and ability to handle both numerical and categorical data .
Neural networks are more complex than linear regression as they consist of multiple layers of interconnected nodes or 'neurons' that can model complex, non-linear relationships in data. While linear regression is limited to modeling linear relationships between a dependent variable and one or more independent variables, neural networks' architecture allows them to capture intricate patterns by adjusting weights through backpropagation across multiple layers .
In image recognition, neural networks, particularly convolutional neural networks (CNNs), are employed to detect and process the spatial hierarchies of pixel patterns and features within images. For natural language processing, recurrent neural networks (RNNs) and transformers are more common as they are capable of understanding and generating text by capturing temporal dynamics and contextual word meanings. While both tasks utilize neural networks to identify complex patterns, their architectures differ significantly to cater to the specifics of visual versus textual data .
Supervised learning requires labeled datasets where the algorithm learns to predict outputs from input-output pairings, while unsupervised learning works with unlabeled datasets to identify patterns or structures. Reinforcement learning is different from both, as it involves making decisions by performing actions and receiving feedback through rewards or penalties with the aim of maximizing cumulative rewards .
Machine learning contributes to autonomous vehicles by enabling core functionalities such as perception, decision-making, and navigation. Techniques like computer vision, using neural networks, allow vehicles to identify and classify objects on the road. Reinforcement learning models help optimize driving strategies by continuously learning from feedback in real-time driving scenarios, thus improving decision-making and efficiency .
Supervised learning algorithms in recommendation systems are used by training models on user interactions (input) with items (output) to learn preferences and make predictions on potential user interest in other items. Techniques like collaborative filtering and matrix factorization are often utilized to analyze past behavior and predict future preferences, offering personalized recommendations based on user history and item similarities .
In reinforcement learning, feedback in the form of rewards or penalties is critical as it guides the algorithm to make better decisions over time by aiming to maximize cumulative rewards. Unlike the labeled data used in supervised learning where the correct output is known and used to train the model, reinforcement learning relies on indirect feedback from the environment, which makes it more suited for sequential decision-making tasks .
Decision trees effectively handle both numerical and categorical data due to their flexibility in creating rules based on data type without requiring normalization or scaling. They split data at optimal points by calculating impurity measures, such as Gini impurity or entropy, which enables them to handle mixed data types efficiently. This makes them robust and interpretable for complex and varied datasets .
The primary challenge of unsupervised learning is the lack of labeled data, which makes evaluation of the model's performance difficult since there is no ground truth for comparison. Additionally, selecting appropriate algorithms and parameters that genuinely capture the hidden patterns is complex, leading to potential overfitting or underfitting. The interpretability of the patterns found can also pose significant theoretical and practical difficulties .
Linear regression is significant in machine learning as it provides a straightforward method for modeling the linear relationship between a dependent variable and one or more independent variables. Its simplicity allows for easy interpretation and quick implementation. However, its limitations lie in its inability to model non-linear relationships and in assumptions like homoscedasticity and the linearity of errors, which may not hold in all datasets .