# 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.

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
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
Got questions? Join the online conversation and get instant answers!