Unit 3
Unit 3
x y
3 8
9 6
5 4
3 2
• Y - response variable, x - predictor variable; a and bare the regression coefficients that
describe the relationship between y and x.
• The relative predictive power of an exponential model is denoted by R2; its value varies
between 0 and 1.
• Like exponential regression, logarithmic regression is used to model processes where
growth or decay accelerates rapidly at first and then slows over time. This regression
produces an equation of the form
• Y - response variable, x - the predictor variable; a and b are the regression coefficients
that describe the relationship between y and x.
Polynomial and Response Surface Regressions
• the relationship between the independent variable x and the dependent variable y is modelled as an nth-
degree polynomial in x.
• This regression produces an equation of the form
• ai are the coefficients of the polynomial terms, and n is the degree of the polynomial function. a0 is typically
referred to as the intercept.
• Polynomial regression is a special linear regression case since we fit the polyno-mial equation on the data
with a curvilinear relationship between the dependent and independent variables.
• The response surface regression (RSR) explores and finds the relationship between several independent
variables and one or more response or dependent variables.
• RSR produces a polynomial regression model with cross-product terms of variables denoting the
interaction between them. For instance, a response variable y, which depends on the variables x1, x2,and x3,
can be modelled using an RSR model with an equation of the form
Splines
• Spline is a function defined piecewise by polynomials. Spline Regression is a non-
parametric regression technique in which the dataset is divided into bins at intervals
called knots.
• Splines are polynomial segments strung together and joining at knots. This approach
allows smooth interpolating between knots.
• An efficient way to implement splines is to place more knots where we believe the
function might vary most quickly, and place fewer knots in the stable region.
• Nevertheless, in practice, it is common to place knots uniformly.
• This is done by specifying the desired degrees of freedom, and consequently, the
software places the knots at uniform quantiles of data.
• The desired degrees of freedom are set to minimize the residual sum of squares.
Multivariate Adaptive Regression Splines
• Kriging is a spatial interpolation method; it uses a limited set of sampled data points to
estimate the value of a variable by interpolation over a continuous spatial field.
• For instance, the average monthly carbon dioxide concentration over a city varies across
a random spatial field. It differs from other simple methods like linear regression or
splines since it uses the spatial correlation between sampled points to estimate the
variable’s value through interpolation in the spatial field.
• Kriging weights are estimated such that points close to the location of interest have
more weight than those located farther away.
• The Kriging procedure is performed in two steps:
• first, the spatial covariance structure of the sample points is fitted in a variogram;
• second, weights derived from this structure are used for interpolation in the spatial field.
• Covariance measures the direction of the relationship between two variables; thus, a
positive covariance indicates that both variables tend to be high or low simultaneously,
while a negative covariance means the opposite.
• A variogram is a visual representation of the covariance between each
pair of sampled data points.
• The gamma value (a measure of the half mean-square difference
between their values) is plotted against the distance (lag) between them
for each pair of points. We can choose between different variogram
models; the best-fitting models use different approaches such as least-
squares, maximum likelihood, and Bayesian methods.
• Kriging assumes (i) stationarity, which means that the joint probability
distribution does not vary across the space; and (ii) isotropy, or
uniformity in all directions.
• The Kriging interpolator is sensitive to the variogram model; moreover,
this regression method is limited if the number of data is limited in
spatial scope.
Non-linear Regression Models
• In simple linear regression, the linear model has two variables, x, the independent
variable, y, the dependent variable, and the parameters m and b
• We use a specific method to estimate the parameters of the model and apply a certain
criterion function:
where modifying above the estimated values of the dependent variable, and yi are the
measured values of the dependent variable. Here, we assumed that all the observations
are equally reliable;
otherwise, a weighted (w) sum of squares may be minimized:
Assumptions in NonLinear
Regression
• These assumptions are similar to those in linear regression but may
have nuanced interpretations due to the nonlinearity of the model.
Here are the key assumptions in nonlinear regression:
• Functional Form: The chosen nonlinear model correctly represents the true
relationship between the dependent and independent variables.
• Independence: Observations are assumed to be independent of each other.
• Homoscedasticity: The variance of the residuals (the differences between
observed and predicted values) is constant across all levels of the
independent variable.
• Normality: Residuals are assumed to be normally distributed.
• Multicollinearity: Independent variables are not perfectly correlated.
Types of Non-Linear Regression
• There are two main types of Non Linear regression in Machine Learning:
• Parametric non-linear regression
• assumes that the relationship between the dependent and independent variables can be
modeled using a specific mathematical function.
• For example, the relationship between the population of a country and time can be modeled
using an exponential function.
• Some common parametric non-linear regression models include: Polynomial regression,
Logistic regression, Exponential regression, Power regression etc.
• Non-parametric non-linear regression
• does not assume that the relationship between the dependent and independent variables can
be modeled using a specific mathematical function.
• Instead, it uses machine learning algorithms to learn the relationship from the data.
• Some common non-parametric non-linear regression algorithms include: Kernel smoothing,
Local polynomial regression, Nearest neighbor regression etc.
Non-Linear Regression Algorithms
• Nonlinear regression encompasses various types of models that capture relationships
betwee
• Polynomial Regression
• Polynomial regression is a type of nonlinear regression that fits a polynomial function to
the data. The general form of a polynomial regression model is:
• y=β0+β1X+β2X2+……….+βnXn
• y=β0+β1X+β2X2+……….+βnXn
• where,
• y : dependent variable
• X : independent variable
• β0,β1,…βnβ0,β1,…βn: parameters of the model
• n : degree of the polynomial
• n variables in a nonlinear manner.
• Exponential Regression
• Exponential regression is a type of nonlinear regression that fits an exponential function to the
data. The general form of an exponential regression model is:
• y=αe(βx)
• y=αe(βx)
• where,
• y – dependent variable
• X – independent variable
• α and β
• α and β – parameters of the model
• Logarithmic Regression
• Logarithmic regression is a type of nonlinear regression that fits a logarithmic function to the
data. The general form of a logarithmic regression model is:
• y=α+βln(x)
• y=α+βln(x)
• where,
• y – dependent variable
• X – independent variable
• Αandβ
• αandβ – parameters of the model
• Power Regression
• Power regression is a type of nonlinear regression that fits a power
function to the data. The general form of a power regression model is:
• y=αxβ
• y=αxβ
• where,
• y – dependent variable
• X – independent variable
• α and βα and β – parameters of the model
Generalized Additive Models
(GAMs)