The use of Artificial Intelligence (AI) in machine learning and data science enabled advancements in areas such as natural language processing, computer vision, recommendation systems, fraud detection, predictive analytics, and personalized medicine. Follow along and check the 23 most common Artificial Intelligence interview questions answered for your next Machine Learning and Data Science interview preparation.
Reinforcement learning (RL) is a subset of machine learning that allows an AI-driven system (sometimes referred to as an agent) to learn through trial and error using feedback from its actions. This feedback is either negative or positive, signaled as punishment or reward with, of course, the aim of maximizing the reward function.
In terms of learning methods, RL is similar to supervised learning only in that it uses mapping between input and output, but that is the only thing they have in common. Whereas in supervised learning, the feedback contains the correct set of actions for the agent to follow. In RL there is no such answer key. The agent decides what to do itself to perform the task correctly.
Compared with unsupervised learning, RL has different goals. The goal of unsupervised learning is to find similarities or differences between data points. RL's goal is to find the most suitable action model to maximize total cumulative reward for the RL agent. With no training dataset, the RL problem is solved by the agent's own actions with input from the environment.
Dimensionality Reduction is typically choosing a basis or mathematical representation within which you can describe most but not all of the variance within your data, thereby retaining the relevant information, while reducing the amount of information necessary to represent it.
There are a variety of techniques for doing this including but not limited to PCA, ICA, and Matrix Feature Factorization.
These will take existing data and reduce it to the most discriminative components. These all allow you to represent most of the information in your dataset with fewer, more discriminative features.
There are some of the basic terminologies related to genetic algorithms:
The very basic idea is the following: they take n tokens as input, and produce one token as output.
A token is a chunk of text. In the context of OpenAI GPT models, common and short words typically correspond to a single token and long and less commonly used words are generally broken up into several tokens.
This basic idea is applied in an expanding-window pattern. You give it n tokens in, it produces one token out, then it incorporates that output token as part of the input of the next iteration, produces a new token out, and so on. This pattern keeps repeating until a stopping condition is reached, indicating that it finished generating all the text you need.
Now, behind the output is a probability distribution over all the possible tokens. What the model does is return a vector in which each entry expresses the probability of a particular token being chosen.
This probability distribution comes from the training phase. During training, the model is exposed to a lot of text, and its weights are tuned to predict good probability distributions, given a sequence of input tokens.
GPT generative models are trained with a large portion of the internet, so their predictions reflect a mix of the information they’ve seen.
As we increase the number of dimensions, our data becomes more sparse; every new dimension increases the volume of the feature space, giving our data a higher differentiation chance and therefore, the possibility of it becoming more spread out in a higher dimensional space than in a lower one. This means that if we need more training samples of a kind for our model to be able to learn about them and be able to predict them well, generalizing, in the future.
As we increase the number of dimensions, especially for parametric models, we increase the time it takes to train them.
Introducing features that don’t add much value to our models and therefore increasing the number of dimensions, makes our model learn from these noisy or irrelevant features and can lead to a reduction in its performance.
More features and thus dimensions lead to models that are more complex and harder to interpret than those with a low number of features.
-1 to 1 or to 0 to 1.p unit vectors, where the i-th vector is the direction of a line that best fits the data while being orthogonal to the i - 1 vectors. The best-fitting line is defined as the line that minimizes the average squared distance from the points to the line.Supervised learning is when the data you feed your algorithm with is tagged or labelled, to help your logic make decisions.
Example: a hypothetical non-machine learning algorithm for face detection in images would try to define what a face is (round skin-like-colored disk, with dark area where you expect the eyes etc). A machine learning algorithm would not have such coded definition, but would "learn-by-examples": you'll show several images of faces and not-faces and a good algorithm will eventually learn and be able to predict whether or not an unseen image is a face.
Unsupervised learning are types of algorithms that try to find correlations without any external inputs other than the raw data (your examples are not labeled, i.e. you don't say anything). In such a case the algorithm itself cannot "invent" what a face is, but it can try to cluster the data into different groups, e.g. it can distinguish that faces are very different from landscapes, which are very different from horses.
2-5 words is typical.A model with too little capacity cannot learn the problem, but a model with too much capacity will overfit the data. To prevent overfitting the data some things that can be done are:
The building blocks of ChatGPT are:
Depending on the target variable, there are use various methods for feature selection.
In Filter methods we use statistical techniques to evaluate the relationship between each input variable and the target variable. They are suitable when we have to deal with high-dimensional data. Some of these techniques are:
2 or more variables, so we can select those features that have a high correlation with the target, but keeping in mind that the features should be uncorrelated among themselves.In wrapper methods we create many models with different subsets of input features and select those features that result in the best performing model according to a performance metric. Some of these techniques include:
If we have unlabeled data, we can use some of the following criteria:
There are several Transfer Learning techniques that are commonly used in LLMs. Here are three of the most popular:
Feature-based transfer learning: This technique involves using a pre-trained language model as a feature extractor, and then training a separate model on top of the extracted features for the target task.
Fine-tuning: involves taking a pre-trained language model and training it on a specific task. Sometimes when fine-tuning, you can keep the model weights fixed and just add a new layer that you will train. Other times you can slowly unfreeze the layers one at a time. You can also use unlabelled data when pre-training, by masking words and trying to predict which word was masked.
Multi-task learning: involves training a single model on multiple related tasks simultaneously. The idea is that the model will learn to share information across tasks and improve performance on each individual task as a result.
Bagging:
Boosting
Where:
t in gradient descent.Amazone runs the internet as we know it. Amazon Web Services (AWS) offers a comprehensive suite of machine learning (ML) services that cater to various needs and expertise levels. Follow along and learn the 23 most common AWS machine-learning intervi...
Azure Machine Learning (Azure ML) is a cloud-based service for creating and managing machine learning solutions. It’s designed to scale, distribute, and deploy machine learning models to the cloud. Follow along and learn the 23 most common Azure Mach...
Hadoop is an open-source big data processing framework. It leverages distributed computing to store and process large datasets in a fault-tolerant manner. According to recent reports, Apache Hadoop is one of the most sought-after big data skills with...