Page 276 - Artificial Intellegence_v2.0_Class_11
P. 276
Regression is basically used when the dependent variable is of a continuous data type. The independent variables, on the
other hand, can be of any data type—continuous, nominal/categorical etc.
Linear Regression
Linear Regression is a supervised learning algorithm. It makes use of one independent variable, X, to predict the outcome
of a second dependent variable Y. This method finds the most accurate straight line that best describes the relationship
between the dependent and the independent variables, with minimum error.
Applications of Linear Regression
Linear Regression is used in various Artificial Intelligence applications. It has its limitations, but its simplicity, interpretability,
and efficiency often exceed these limitations. Real life applications of Linear Regression include:
• prediction of product demand
• sales forecasting
• analysing the effect of price change of a service
• predict the effect of fertilizer on crop yield
• prediction of revenue through advertisements
• predicting salary of a person based on number of years of experience
Advantage of Linear Regression
• Linear regression is a simple technique and easy to implement.
• Efficient to train the machine on this model.
Disadvantages of Linear Regression
• Regression analysis is sensitive to outliers as these can have a great impact on the analysis.
• It is quite prone to overfitting. (Overfitting means that the training of the model on data is just too good and the test
sample size is quite small).
Task
Which of the following is a regression task? Write Yes or No.
a. Predicting age of a person.
b. Predicting a person’s nationality.
c. Predicting whether a company’s stock price will grow in future.
d. Predicting whether a document talks about spotting spaceships.
Crosstabs
Crosstabs help us determine the relationship between two variables by recording the frequency of observations that
have multiple characteristics. This relationship is presented in a tabular form. Crosstabs (also called contingency tables)
are used for discrete values.
Example: We would like to understand the relationship between sweets consumption (in grams) per week and body
weight (in kg). Further, suppose that 200 individuals were randomly sampled as part of this study. A contingency table
can be created to display the amount of sweets and its effect on body weight. Such a contingency table is given below:
274 Touchpad Artificial Intelligence (Ver. 2.0)-XI

