What minimization is a basic technique in linear regression of learning models? How do you get the minimum? Please explain.
Is learning to play tennis supervised learning or reinforcement learning? And why?
1) What is Regression Analysis?
Regression analysis is a form of predictive modelling technique which investigates the relationship between a dependent (target) and independent variable (s) (predictor). This technique is used for forecasting, time series modelling and finding the causal effect relationship between the variables.
There are multiple benefits of using regression analysis. They are as follows:
Linear Regression
It is one of the most widely known modeling technique. Linear regression is usually among the first few topics which people pick while learning predictive modeling. In this technique, the dependent variable is continuous, independent variable(s) can be continuous or discrete, and nature of regression line is linear.
Linear Regression establishes a relationship between dependent variable (Y) and one or more independent variables (X) using a best fit straight line (also known as regression line).
It is represented by an equation Y=a+b*X + e, where a is intercept, b is slope of the line and e is error term. This equation can be used to predict the value of target variable based on given predictor variable(s).
The difference between simple linear regression and multiple linear regression is that, multiple linear regression has (>1) independent variables, whereas simple linear regression has only 1 independent variable. Now, the question is “How do we obtain best fit line?”.
How to obtain best fit line (Value of a and b)?
This task can be easily accomplished by Least Square Method. It is the most common method used for fitting a regression line. It calculates the best-fit line for the observed data by minimizing the sum of the squares of the vertical deviations from each data point to the line. Because the deviations are first squared, when added, there is no cancelling out between positive and negative values.
We can evaluate the model performance using the metric R-square. To know more details about these metrics, you can read: Model Performance metrics Part 1, Part 2 .
Important Points:
FINDING MINIMUM IN LINEAR REGRESSION:
This is the distinction between having an objective, and the methodology you use to achieve an objective.
In fitting a model, your objective (used as a synonym here for goal, i.e. what you hope to achieve) is to minimize some loss function. In the case of linear regression, that loss function is the least squares loss, but other loss functions are used in other situation. The important point is that the process of fitting the model is synonymous with the goal of minimizing this function.
Once you have a goal, you can employ multiple techniques to achieve that goal.
First Technique: Compute the partial derivative of the loss function, then try to solve the resulting equations for the zeros of the derivative. This works, sometimes, if the algebraic form of the derivative is simple enough. Often this is just not possible, algebraically (as is the case in logistic regression).
Second Technique: Use gradient descent with some stopping criteria to approximate the zeros. This is almost always applicable, even though it does not achieve an exact solution, and allows us little leverage to analyze the properties of the solution.
So you see, both techniques attack the same goal, but they offer different pros and cons in actually achieving that goal
2)Is learning to play tennis supervised learning or reinforcement learning? And why?
Reinforcement Learning has been used for control problems like Elevator Dispatching, dynamic channel allocation and strategy games like Back-Gammon and Checkers with very large state spaces of the order of 10^20. An alternative form of learning called supervised learning is learning from examples provided by an external agent, but alone it is not enough for learning from interaction. In interactive problems such as ours is a bit impractical to get examples of desired behavior that are both accurate and representative of all the situations in which the agent has to act. In uncharted territory---where one would expect learning to be most useful---an agent must be able to learn from its own experience. A game like Table-tennis ( or similar racquet sports) provide an interesting mix of control problems and strategy problems making the task of developing good players quite challenging.
Reinforcement Learning method, called the Actor Critic models, that combine the Value based models with a Policy based model to better learn the environment.
WHY?
We will train two separate agents to learn how to play a game of Table Tennis, interacting with each other to pass a ball back and forth between each other without dropping it.
In this environment, two agents control rackets to bounce a ball over a net. If an agent hits the ball over the net, it receives a reward of +0.1. If an agent lets a ball hit the ground or hits the ball out of bounds, it receives a reward of -0.01. Thus, the goal of each agent is to keep the ball in play.
The observation space consists of 8 variables corresponding to the position and velocity of the ball and racket. Each agent receives its own, local observation. Two continuous actions are available, corresponding to movement toward (or away from) the net, and jumping.
The task is episodic, and in order to solve the environment, your agents must get an average score of +0.5 (over 100 consecutive episodes, after taking the maximum over both agents).
Get Answers For Free
Most questions answered within 1 hours.