# Machine learning lecture 1 course notes  (Page 12/13)

 Page 12 / 13

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 $\mathcal{N}\left(\mu ,{\sigma }^{2}\right)$ . (Here, $\mu$ may depend $x$ .) So, we let the $ExponentialFamily\left(\eta \right)$ distribution above be the Gaussian distribution. As we saw previously, in the formulation of the Gaussian as an exponential family distribution, we had $\mu =\eta$ . So, we have

$\begin{array}{ccc}\hfill {h}_{\theta }\left(x\right)& =& E\left[y|x;\theta \right]\hfill \\ & =& \mu \hfill \\ & =& \eta \hfill \\ & =& {\theta }^{T}x.\hfill \end{array}$

The first equality follows from Assumption 2, above; the second equality follows from the fact that $y|x;\theta \sim \mathcal{N}\left(\mu ,{\sigma }^{2}\right)$ , and so its expected value is given by $\mu$ ; the third equality follows from Assumption 1 (and our earlier derivation showing that $\mu =\eta$ 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\in \left\{0,1\right\}$ . 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 $\Phi =1/\left(1+{e}^{-\eta }\right)$ . Furthermore, note that if $y|x;\theta \sim \mathrm{Bernoulli}\left(\Phi \right)$ , then $\mathrm{E}\left[y|x;\theta \right]=\Phi$ . So, following a similar derivation as the one for ordinary least squares, we get:

$\begin{array}{ccc}\hfill {h}_{\theta }\left(x\right)& =& E\left[y|x;\theta \right]\hfill \\ & =& \Phi \hfill \\ & =& 1/\left(1+{e}^{-\eta }\right)\hfill \\ & =& 1/\left(1+{e}^{-{\theta }^{T}x}\right)\hfill \end{array}$

So, this gives us hypothesis functions of the form ${h}_{\theta }\left(x\right)=1/\left(1+{e}^{-{\theta }^{T}x}\right)$ . If you are previously wondering how we came up with the form of thelogistic function $1/\left(1+{e}^{-z}\right)$ , 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\left(\eta \right)=\mathrm{E}\left[T\left(y\right);\eta \right]$ ) 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.

where we get a research paper on Nano chemistry....?
what are the products of Nano chemistry?
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
revolt
da
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
I only see partial conversation and what's the question here!
what about nanotechnology for water purification
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
Got questions? Join the online conversation and get instant answers!