<< Chapter < Page Chapter >> Page >

The third of these assumptions might seem the least well justified of the above, and it might be better thought of as a “design choice” in ourrecipe for designing GLMs, rather than as an assumption per se. These three assumptions/design choices will allow us to derive avery elegant class of learning algorithms, namely GLMs, that have many desirableproperties such as ease of learning. Furthermore, the resultingmodels are often very effective for modelling different types of distributions over y ; for example, we will shortly show that both logistic regression and ordinary least squarescan both be derived as GLMs.

Ordinary least squares

To show that ordinary least squares is a special case of the GLM family of models, consider the setting where the target variable y (also called the response variable in GLM terminology) is continuous, and we model the conditional distribution of y given x as as a Gaussian N ( μ , σ 2 ) . (Here, μ may depend x .) So, we let the E x p o n e n t i a l F a m i l y ( η ) distribution above be the Gaussian distribution. As we saw previously, in the formulation of the Gaussian as an exponential family distribution, we had μ = η . So, we have

h θ ( x ) = E [ y | x ; θ ] = μ = η = θ T x .

The first equality follows from Assumption 2, above; the second equality follows from the fact that y | x ; θ N ( μ , σ 2 ) , and so its expected value is given by μ ; the third equality follows from Assumption 1 (and our earlier derivation showing that μ = η in the formulation of the Gaussian as an exponential family distribution); and thelast equality follows from Assumption 3.

Logistic regression

We now consider logistic regression. Here we are interested in binary classification, so y { 0 , 1 } . Given that y is binary-valued, it therefore seems natural to choose the Bernoulli family of distributions to model the conditional distribution of y given x . In our formulation of the Bernoulli distribution as an exponential family distribution, we had Φ = 1 / ( 1 + e - η ) . Furthermore, note that if y | x ; θ Bernoulli ( Φ ) , then E [ y | x ; θ ] = Φ . So, following a similar derivation as the one for ordinary least squares, we get:

h θ ( x ) = E [ y | x ; θ ] = Φ = 1 / ( 1 + e - η ) = 1 / ( 1 + e - θ T x )

So, this gives us hypothesis functions of the form h θ ( x ) = 1 / ( 1 + e - θ T x ) . If you are previously wondering how we came up with the form of thelogistic function 1 / ( 1 + e - z ) , this gives one answer: Once we assume that y conditioned on x is Bernoulli, it arises as a consequence of the definition of GLMs and exponential family distributions.

To introduce a little more terminology, the function g giving the distribution's mean as a function of the natural parameter ( g ( η ) = E [ T ( y ) ; η ] ) is called the canonical response function . Its inverse, g - 1 , is called the canonical link function . Thus, the canonical response function for the Gaussian family is just the identify function; and the canonicalresponse function for the Bernoulli is the logistic function. Many texts use g to denote the link function, and g - 1 to denote the response function; but the notation we're using here, inherited from the early machinelearning literature, will be more consistent with the notation used in the rest of the class.

Questions & Answers

how do we prove the quadratic formular
Seidu Reply
hello, if you have a question about Algebra 2. I may be able to help. I am an Algebra 2 Teacher
Shirley Reply
thank you help me with how to prove the quadratic equation
may God blessed u for that. Please I want u to help me in sets.
what is math number
Tric Reply
x-2y+3z=-3 2x-y+z=7 -x+3y-z=6
Sidiki Reply
Need help solving this problem (2/7)^-2
Simone Reply
what is the coefficient of -4×
Mehri Reply
the operation * is x * y =x + y/ 1+(x × y) show if the operation is commutative if x × y is not equal to -1
Alfred Reply
An investment account was opened with an initial deposit of $9,600 and earns 7.4% interest, compounded continuously. How much will the account be worth after 15 years?
Kala Reply
lim x to infinity e^1-e^-1/log(1+x)
given eccentricity and a point find the equiation
Moses Reply
12, 17, 22.... 25th term
Alexandra Reply
12, 17, 22.... 25th term
College algebra is really hard?
Shirleen Reply
Absolutely, for me. My problems with math started in First grade...involving a nun Sister Anastasia, bad vision, talking & getting expelled from Catholic school. When it comes to math I just can't focus and all I can hear is our family silverware banging and clanging on the pink Formica table.
I'm 13 and I understand it great
I am 1 year old but I can do it! 1+1=2 proof very hard for me though.
Not really they are just easy concepts which can be understood if you have great basics. I am 14 I understood them easily.
hi vedant can u help me with some assignments
find the 15th term of the geometric sequince whose first is 18 and last term of 387
Jerwin Reply
I know this work
The given of f(x=x-2. then what is the value of this f(3) 5f(x+1)
virgelyn Reply
hmm well what is the answer
If f(x) = x-2 then, f(3) when 5f(x+1) 5((3-2)+1) 5(1+1) 5(2) 10
how do they get the third part x = (32)5/4
kinnecy Reply
make 5/4 into a mixed number, make that a decimal, and then multiply 32 by the decimal 5/4 turns out to be
A soccer field is a rectangle 130 meters wide and 110 meters long. The coach asks players to run from one corner to the other corner diagonally across. What is that distance, to the nearest tenths place.
Kimberly Reply
Jeannette has $5 and $10 bills in her wallet. The number of fives is three more than six times the number of tens. Let t represent the number of tens. Write an expression for the number of fives.
August Reply
What is the expressiin for seven less than four times the number of nickels
Leonardo Reply
How do i figure this problem out.
how do you translate this in Algebraic Expressions
linda Reply
why surface tension is zero at critical temperature
I think if critical temperature denote high temperature then a liquid stats boils that time the water stats to evaporate so some moles of h2o to up and due to high temp the bonding break they have low density so it can be a reason
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Machine learning. OpenStax CNX. Oct 14, 2013 Download for free at http://cnx.org/content/col11500/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Machine learning' conversation and receive update notifications?