Neural network (deep learning technique) is composed of multiple neurons which are connected by weights. Neurons are individual computational units and weights are mathematical representation of how much information is allowed to flow from one neuron (node) to the next. Training a neural network involves finding values for each weight.
Deep learning is a ML technique that is based on a conceptual idea of how the human brain works.
Model parameter are settings or configurations that change how the model behaves. Hyper parameters are settings that doesn’t change model behavior during training but can affect things like how quickly & reliably the model trains.
Loss function is the distance between what the model predicts and what the actual value is. The goal of model training is to minimize the loss function.
The bias-variance trade-off basically says that you can improve and decrease variance (overfitting: model too sensitive to little changes in the data, a model potentially picking up random noise) by increasing bias (underfitting: model not picking up relevant relations between the features and the desired output).
Basically, if your model is overfitting (high variance), try to increase the bias and if the model is underfitting (high bias), try to increase the variance. bias-variance trade-off is trying to find the perfect balance between the two so that the model can generalize well to new unseen data while capturing the regularities in the data.
Log loss is how certain/uncertain a model is of it’s prediction. For example, a model might predict that somebody is going to buy a laptop with 10% certainty, then another time, it predicts a customer is going to buy a laptop with 50% certainty.
In the first scenario, the model is 90% uncertain about it’s predictions and in the second scenario, the model is 50% uncertain about it’s predictions. So, log loss is how accurate the model thinks it’s predictions are. And the model’s certainty about it’s predictions change overtime.
Model accuracy is what percentage of the predictions the model get’s correct.
Metrics for evaluating a model can be found here . This sklearn page defines different metrics for different types of models (regression, classification, clustering, multilabel, etc.)
In regression models, root mean square (RMS) can be seen as the average error across the test dataset. Assuming you have a linear line, you want the data points to be as close to this linear line as possible in order to minimize net error. So, the goal is a lower RMS score for your regression models.
Plane – A flat surface where 2 points can be joined by a line.
HyperPlane is a surface that contains more than 2 planes.
Recall vs Prediction. Taking the presence of apple or no apple in a picture as an example. Prediction: Of all the predictions, how many were right. And recall is, Of all the pictures with apple in it, how many were detected?
Agent – A piece of software being trained to make decisions in an environment to reach a goal.
Environment – The surrounding area within which the agent interacts.
State – The current position within the environment that is visible, or known, to an agent. Could be an image captured by it’s camera.
Action – What the agent does towards reaching it’s goal. For every state, an agent needs to take an action toward achieving its goal.
Action Space – All the valid actions and choice available to an agent as it interacts with an environment.
- Discrete action space – Allows the agent to choose from a finite set of possible actions for each state in the environment.
- Continuous action space – Allows the agent to select an action from a range of values defined for each state. A range of values is defined in each state, that agent can choose from the predefined range of values (this will create more complexity since there are more choices per state).
Reward – Feedback in the form of numerical reward is given to an agent for each action it takes.
Reward Function – An incentive plan that assigns scores as rewards to different areas of the environment. The purpose of which is to encourage the agent to reach it’s goal.
Episode – A period of trial and error when an agent makes decisions and gets feedback from its environment.
In Summary – In a reinforcement learning model, an agent learns in an interactive real-time environment by trial and error using feedback from its own actions. Feedback is given in the form of rewards.
Hyper-parameters – Variables that control the performance of the agent during training. Can change things to impact the inference of the model.
- For example, Learning rate which controls how many new experiences are counted in learning at each step. Higher learning rate results in faster training, but may reduce the model’s quality.
Training algorithm defines the model’s learning objective.
What makes machine learning special is that agents can learn and improve without being explicitly programmed to do so.
There are 3 main types of generative Ai.
- generative adversarial networks (GANs)
- general autoregressive models
- transformer-based models.
Generative Adversarial Networks (GANS) are actually 2 networks working against each other. There is the generative network that produces new content and then there is the discriminator network that checks if the work produced by generative network represents the data in the training dataset.
AutoRegressive Convolutional Neural Networks (AR-CNNs) are models that are constantly changing and they assume that future data is basely solely on prior data. Think something like stocks or shopping patterns year long, or weather predictions.
Transformer-based models are mostly for sequential data and is used a lot in modern natural language processing.
Machine Learning algorithms falls under 2 primary techniques.
- Discriminative algorithm and
- generative algorithm
In discriminative algorithm, the model tries to identify something, discern the presence or absence of something. Think…the presence of a cat or not cat. Is it a dog or no dog.
Generative algorithm, the model tries to replicate the data present in the training dataset. Typically using the pattern learned during training to generate new data.