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

 Page 10 / 13
$\theta :=\theta -{H}^{-1}{\nabla }_{\theta }\ell \left(\theta \right).$

Here, ${\nabla }_{\theta }\ell \left(\theta \right)$ is, as usual, the vector of partial derivatives of $\ell \left(\theta \right)$ with respect to the ${\theta }_{i}$ 's; and $H$ is an $n$ -by- $n$ matrix (actually, $n+1$ -by- $n+1$ , assuming that we include the intercept term) called the Hessian , whose entries are given by

${H}_{ij}=\frac{{\partial }^{2}\ell \left(\theta \right)}{\partial {\theta }_{i}\partial {\theta }_{j}}.$

Newton's method typically enjoys faster convergence than (batch) gradient descent, and requires many fewer iterations to get very close to theminimum. One iteration of Newton's can, however, be more expensive than one iteration of gradient descent, since it requires finding andinverting an $n$ -by- $n$ Hessian; but so long as $n$ is not too large, it is usually much faster overall. When Newton's method is applied to maximize thelogistic regression log likelihood function $\ell \left(\theta \right)$ , the resulting method is also called Fisher scoring .

## Generalized linear models The presentation of the material in this section takes inspiration from Michael I. Jordan, Learning in graphical models (unpublished book draft), and also McCullagh and Nelder, Generalized Linear Models (2nd ed.) .

So far, we've seen a regression example, and a classification example. In the regression example, we had $y|x;\theta \sim \mathcal{N}\left(\mu ,{\sigma }^{2}\right)$ , and in the classification one, $y|x;\theta \sim \mathrm{Bernoulli}\left(\Phi \right)$ , for some appropriate definitions of $\mu$ and $\Phi$ as functions of $x$ and $\theta$ . In this section, we will show that both of these methods are special cases of a broader family of models, calledGeneralized Linear Models (GLMs). We will also show how other models in the GLM family can be derived and applied to other classificationand regression problems.

## The exponential family

To work our way up to GLMs, we will begin by defining exponential family distributions. We say that a class of distributions is in the exponential family if it can be writtenin the form

$p\left(y;\eta \right)=b\left(y\right)exp\left({\eta }^{T}T\left(y\right)-a\left(\eta \right)\right)$

Here, $\eta$ is called the natural parameter (also called the canonical parameter ) of the distribution; $T\left(y\right)$ is the sufficient statistic (for the distributions we consider, it will often be the case that $T\left(y\right)=y$ ); and $a\left(\eta \right)$ is the log partition function . The quantity ${e}^{-a\left(\eta \right)}$ essentially plays the role of a normalization constant, that makes sure the distribution $p\left(y;\eta \right)$ sums/integrates over $y$ to 1.

A fixed choice of $T$ , $a$ and $b$ defines a family (or set) of distributions that is parameterized by $\eta$ ; as we vary $\eta$ , we then get different distributions within this family.

We now show that the Bernoulli and the Gaussian distributions are examples of exponential family distributions. The Bernoulli distribution with mean $\Phi$ , written $\mathrm{Bernoulli}\left(\Phi \right)$ , specifies a distribution over $y\in \left\{0,1\right\}$ , so that $p\left(y=1;\Phi \right)=\Phi$ ; $p\left(y=0;\Phi \right)=1-\Phi$ . As we vary $\Phi$ , we obtain Bernoulli distributions with different means. We now show that this class of Bernoullidistributions, ones obtained by varying $\Phi$ , is in the exponential family; i.e., that there is a choice of $T$ , $a$ and $b$ so that Equation  [link] becomes exactly the class of Bernoulli distributions.

We write the Bernoulli distribution as:

$\begin{array}{ccc}\hfill p\left(y;\Phi \right)& =& {\Phi }^{y}{\left(1-\Phi \right)}^{1-y}\hfill \\ & =& exp\left(ylog\Phi +\left(1-y\right)log\left(1-\Phi \right)\right)\hfill \\ & =& exp\left(\left(log,\left(\frac{\Phi }{1-\Phi }\right)\right),y,+,log,\left(1-\Phi \right)\right).\hfill \end{array}$

Thus, the natural parameter is given by $\eta =log\left(\Phi /\left(1-\Phi \right)\right)$ . Interestingly, if we invert this definition for $\eta$ by solving for $\Phi$ in terms of $\eta$ , we obtain $\Phi =1/\left(1+{e}^{-\eta }\right)$ . This is the familiar sigmoid function! This will come up again when we derive logisticregression as a GLM. To complete the formulation of the Bernoulli distribution as an exponential familydistribution, we also have

how do they get the third part x = (32)5/4
can someone help me with some logarithmic and exponential equations.
20/(×-6^2)
Salomon
okay, so you have 6 raised to the power of 2. what is that part of your answer
I don't understand what the A with approx sign and the boxed x mean
it think it's written 20/(X-6)^2 so it's 20 divided by X-6 squared
Salomon
I'm not sure why it wrote it the other way
Salomon
I got X =-6
Salomon
ok. so take the square root of both sides, now you have plus or minus the square root of 20= x-6
oops. ignore that.
so you not have an equal sign anywhere in the original equation?
Commplementary angles
hello
Sherica
im all ears I need to learn
Sherica
right! what he said ⤴⤴⤴
Tamia
hii
Uday
what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
a perfect square v²+2v+_
kkk nice
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
or infinite solutions?
Kim
The answer is neither. The function, 2 = 0 cannot exist. Hence, the function is undefined.
Al
y=10×
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
rolling four fair dice and getting an even number an all four dice
Kristine 2*2*2=8
Differences Between Laspeyres and Paasche Indices
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
is it 3×y ?
J, combine like terms 7x-4y
how do you translate this in Algebraic Expressions
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
what is nanomaterials​ and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
Hello
Uday
I'm interested in Nanotube
Uday
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
Prasenjit
can nanotechnology change the direction of the face of the world
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
the Beer law works very well for dilute solutions but fails for very high concentrations. why?
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!