Artificial Intelligence: Learning
Machine learning is changing the way we see the world. Streaming platforms are analyzing our preferences to provide personalized recommendations. Voice recognition like Siri, Google Assistant, and Alexa are improving their natural language processing allowing a more accurate, context-aware voice interactions. Real-time translations are providing a more accurate and contextually relevant translation for users. Pretty soon we will be holding our phones up to the hieroglyphs of ancient Egypt, accurately deciphering the stories of the ancient world conveniently on our smart devices for a small price of $0.99 at our favorite App Store.
Supervised learning
A type of machine learning paradigm where a computer algorithm is trained on a labeled dataset, consisting of input-output pairs. During training, the algorithm aims to discover the mapping or relationship between the input data and the corresponding output labels.
In terms of classification, the goal is to categorize or label input data into predefined classes or categories. The algorithm is trained on a labeled dataset, where each example is associated with a specific class label. The objective is to learn a mapping from the input features to the corresponding class labels so that the algorithm can accurately classify new, unseen instances.
Imagine an archaeologist is excavating a site and comes across various pottery fragments. Each fragment has distinctive features such as its dimensions, the presence of specific patterns, and the type of clay used. In this scenario, an archaeologist wants to determine whether a pottery fragment is an antiquity or not based on certain features such as its dimensions and the type of clay used. The task can be formalized as follows: observe nature, where a function f(dimensions, clay type) maps the input to a discrete value, either Antiquity or Not Antiquity. The archaeologist's goal is to create a function h(dimensions, clay type) that can approximate the behavior of f.
Regression
In supervised learning, regression is a type of predictive modeling technique where the goal is to predict a continuous numeric output variable based on one or more input features. It is used when the target variable is quantitative and has a range of possible values. The primary objective of regression is to establish a relationship between the input features and the output variable.
In a regression task, the algorithm learns from a labeled training dataset, where each data point consists of input features and the corresponding actual output values. The trained model can then make predictions on new, unseen data by estimating the continuous output variable.
Common examples of regression tasks include dating artifacts to estimate their age based on composition, style, or markings; analyzing site function features in relation to their purpose (e.g., residential, religious, industrial); and studying monument construction, including techniques, resources used, and the intended purpose of these structures.
Cost Functions in Machine Learning
In machine learning, a loss function (or cost function) is a measure that quantifies the difference between the predicted values of a model and the actual values in the training data. The goal during the training process is to minimize this loss, which essentially represents how well the model is performing.
For classification problems, we can use a 0-1 Loss Function.
- L(actual, predicted):
- 0 if actual = predicted
- 1 otherwise
Overfitting
Overfitting happens when the computer tries to remember every tiny detail in the data it learned, even the random stuff. So, when it faces new data, it can get confused because it got too caught up in the small details instead of grasping the main patterns. It misses the big concept.
Unsupervised Learning
The algorithm is trained on unlabeled data, meaning that the input data does not have corresponding output labels or target values. In unsupervised learning, the algorithm explores the inherent structure and patterns within the data without explicit guidance on what to look for.
The goal is to uncover patterns, relationships or structures that would otherwise be difficult to measure. There are several techniques to achieve this type of learning, one being clustering. The main objective it to take the input data and organize it into groups such that similar objects end up in the same group
[1]: Brian Yu, David J. Malan; Harvard University CS50's Introduction to Artificial Intelligence with Python
[2]: Gareth James, Daniela Witten, Trevor Hastie, Robert Tibshirani, Jonathan Taylor; An Introduction to Statistical Learning with Applications in Python