id
int64
0
25.6k
text
stringlengths
0
4.59k
14,800
polyreg py import numpy as np from numpy random import rand randn from numpy linalg import norm solve import matplotlib pyplot as plt def generate_data (beta sig ) np random rand( ( *np arange ( )beta sig np random randn ( return uy np random seed ( beta np array ([[ - - ]] sig uy generate_data (beta sig nxx np arange ...
14,801
plt xlabel ( '$ 'plt ylabel ( '$ ^{mathcal { }_p} {tau }( )$'plt legend (plots ,('data points ''true ','$ = $underfit ''$ = $correct ','$ = $overfit ')plt savefig ('polyfitpy pdf ',format ='pdf 'plt show (the last code snippet which imports the previous codegenerates the test data and plots the graph of the test lossas...
14,802
quicklybut may not approximate gvery wellwhereas learner from rich class that contains gmay require lot of computing resources to train to better understand the relation between model complexitycomputational simplicityand estimation accuracyit is useful to decompose the generalization risk into several partsso that the...
14,803
thuswhen using squared-error lossthe generalization risk for linear class can be decomposed as`(ggt (ggt (xy) ` (gg (xg( )) (ggt (xgg ( )) { { approximation error ( statistical error note that in this decomposition the statistical error is the only term that depends on the training set example (polynomial regression (c...
14,804
notice how the approximation error becomes smaller as increases in this particular example the approximation error is in fact zero for in generalas the class of approximating functions becomes more complexthe approximation error goes down bthe nextwe illustrate the typical behavior of the statistical error since gt (xx...
14,805
where (xt:ggt (xg(xnow consider the random variable (xt for random training set the expectation of its square is ggt (xg(xed (xt (ed(xt )) var (xt ( (eggt (xg( )) var ggt ( { { pointwise squared bias pointwise variance if we view the learner ggt (xas function of random training setthen the pointwise squared bias term ...
14,806
proper way to assess the prediction accuracy of the learner at the feature vectors xn is to draw new response values yi ( xi ) nthat are independent from the responses yn in the training dataand then estimate the in-sample risk of gt via loss(yi gt (xi ) = for fixed training set twe can compare the training loss of the...
14,807
example (polynomial regression (cont )we continue example where the components of the response vector [ yn ]are independent and normally distributed with variance ` (the irreducible errorand expectations ex yi (xi > bi using the formula ( for the least-squares estimator bthe expected optimism ( is   covx > byi tr cov...
14,808
the idea is to make multiple identical copies of the data setand to partition each copy into different training and test setsas illustrated in figure herethere are four copies of the data set (consisting of response and explanatory variableseach copy is divided into test set (colored blueand training set (colored pinkf...
14,809
polyregcv py from polyreg import k_vals [ number of folds cv np zeros (lenk_vals )max_p )cv loss np ones (( )for in p_range if np hstack ((xu**( - )) for in k_vals loss [for in range ( + )integer indices of test samples test_ind (( / )*( - np arange ( , / + - astype ('int 'train_ind np setdiff (np arange ( )test_ind x_...
14,810
leave-one-out cross-validation figure shows the cross-validation loss for { the case corresponds to the leave-one-out cross-validationwhich can be computed more efficiently using the formula in theorem model modeling data the first step in any data analysis is to model the data in one form or another for examplein an u...
14,811
figure illustrates the modeling tradeoffs the keywords within the triangle represent various modeling paradigms few keywords have been highlightedsymbolizing their importance in modeling the specific meaning of the keywords does not concern us herebut the point is there are many models to choose fromdepending on what a...
14,812
the expected value of this loss (that isthe riskis thus (xf ( `(ge ln (xln dx ( thg( thkullbackleibler divergence ( the integral in ( provides fundamental way to measure the distance between two densities and is called the kullback-leibler (kldivergence between and (thnote that the kl divergence is not symmetric in and...
14,813
th exp(- th) th in other wordswe look for the best gg within the family of exponential distributions with unknown parameter th the likelihood of the data is = (xi thn th exp(-thxi exp(-th xn ln thi= and the score is ( th- th- thusmaximizing the likelihood with respect to th is the same as maximizing -th xn ln th or sol...
14,814
before we discuss few other models in the following sectionswe would like to emphasize number of points about modeling any model for data is likely to be wrong for examplereal data (as opposed to computer-generated dataare often assumed to come from normal distributionwhich is never exactly true howeveran important adv...
14,815
we write ( in and say that has standard normal distribution in rn let = +bz ( for some matrix and -dimensional vector then has expectation vector and covariance matrix bbsee ( and ( this leads to the following definition definition multivariate normal distribution an -dimensional random vector that can be written in th...
14,816
the main reason why the multivariate normal distribution plays an important role in data science and machine learning is that it satisfies the following propertiesthe details and proofs of which can be found in appendix affine combinations are normal marginal distributions are normal conditional distributions are norma...
14,817
bayesian learning in bayesian unsupervised learningwe seek to approximate the unknown joint density ( xn of the training data tn { xn via joint pdf of the form (xi thw(thdth( = where (thbelongs to family of parametric densities :{ (th)th th(viewed as family of pdfs conditional on parameter th in some set th and (this p...
14,818
suppose that we have rough guessdenoted (th)for the best that minimizes the kullback-leibler risk we can always increase the resulting likelihood : ( thw (thr dth by instead using the density (th: (thg( th)/ giving likelihood : ( thw (thdth to see thiswrite and as expectations with respect to in particularwe can write ...
14,819
remark (early stoppingbayes iteration is an example of an "early stoppingheuristic for maximum likelihood optimizationwhere we exit after only one step as observed aboveif we keep iteratingwe obtain the maximum likelihood estimate (mlein sense the bayes rule provides regularization of the mle regularization is discusse...
14,820
hyperparameters it is typical to refer to any parameters of the prior density as hyperparameters of the bayesian model instead of giving directly prior for (or )it turns out to be convenient to give the following prior distribution to / gamma(abs inverse gamma ( the smaller and arethe less informative is the prior unde...
14,821
because the weight parameter gn goes to as ph the improper prior ( also allows us to simplify the posterior marginal for ns / -( - )/ - - ( tg(us tdu ( exp which we recognize as the density corresponding to - gamma sn in addition to ( we can also use an improper prior for if we take the limit and in ( )then we also obt...
14,822
example (bayesian regularization of maximum likelihoodconsider modeling the number of deaths during birth in maternity ward suppose that the hospital data consists of { xn }with xi if the -th baby has died during birth and xi otherwisefor possible bayesian model for the data is th ( (uniform iid priorwith ( xn thber(th...
14,823
in additionwhile computing bayesian credible interval poses no conceptual difficultiesit is not simple to derive confidence interval for the maximum likelihood estimate of thbecause the likelihood as function of th is not differentiable at th as result of this lack of smoothnessthe usual confidence intervals based on t...
14,824
proofto show ( )we apply theorem to ln -nrn (thg(thdthwhere ln (xi th- ln ( th= (thrn (th:ln (tn thn = this gives (with probability onez ln (tn thg(thdth -nr(thln( taking expectations on both sides and using nr(thne[rn (thn ) ( )we deduce ( to demonstrate ( )we derive the asymptotic approximation of ln ( by repeating t...
14,825
example (polynomial regression (cont )consider example once againbut now in bayesian frameworkwhere the prior knowledge on ( bis specified by ( / and ( )and is (matrixhyperparameter let :(xx - )- then the posterior can be written as (bs exp ky-xbk ( ps ) / - exp (yx ( ps / | | / ( )-( + )/ - ks- / ( ) ( exp ( )( + )/ |...
14,826
figure the bic and marginal likelihood used for model selection it is possible to give the model complexity parameter bayesian treatmentin which we define prior density on the set of all models under consideration for examplelet ( ) be prior density on candidate models treating the model complexity index as an addition...
14,827
where all quantities in ( pare computed using the first columns of figure shows the resulting posterior density ( ythe figure also shows the posterior density  ( )where ( = [ln( ( ln( ( ( :exp is derived from the bic approximation ( in both casesthere is clear maximum at suggesting that third-degree polynomial is the ...
14,828
for model is the same as that for model conditioned on that iswe assume ( ( as model contains model as special casethe latter is said to be nested inside model we can formally write (see also exercise ) ( ( up ( du ( un ( du ( hencethe bayes factor simplifies to savage-dickey density ratio (tn ( ( (tn ( tp ( ( ( ( in o...
14,829
show thatfor the squared-error lossthe approximation error `(gg `(gin ( )is equal to (gg (xg( )) [hintexpand `(gg ( (xg(xgg ( )) suppose is the class of linear functions linear function evaluated at feature can be described as (xbx for some parameter vector of appropriate dimension denote gg (xxbg and ggt (xx> show tha...
14,830
consider the setting of the polynomial regression in example use theorem to prove that - - ( bn - ` - ( where : [xx( (xgg ( )) is the matrix with (ij)-th entryz inverse hilbert matrix uij- (hh (uh( )) duand - is the inverse hilbert matrix with (ij)-th entry! + - pj- ij- (- ( - - pj ij observe that for so that the matri...
14,831
figure the large-sample pointwise squared bias of the learner for the bias is zero for for our running example we can use ( to derive large-sample approximation of the pointwise variance of the learner gt (xx> bn in particularshow that for large var gt ( `xh- - xh- mphp ( figure shows this (large-samplevariance of the ...
14,832
let be convex function and let be random variable use the subgradient definition of convexity to prove jensen' inequalityjensen' inequality (xh(ex( using jensen' inequalityshow that the kullback-leibler divergence between probability densities and is always positivethat ise ln ( (xwhere vapnikchernovenkis bound the pur...
14,833
te max zk ln max etzk ln from this derive that max zk ln finallyshow that this last inequality implies that max |zk ln( nk ( (dreturning to the objective of this exercisedenote the elements of by |gand let zk `tn (gk `(gk by part (ait is sufficient tobound maxk |zk show that the {zk satisfy the conditions of (cwith ( )...
14,834
consider the bayesian model for { xn with likelihood ( usuch that ( xn ~iid ( and prior pdf (usuch that ( for some hyperparameter define sequence of densities wt ( ) via wt (uwt- (ug( )starting with (ug(ulet at and bt denote the mean and precision of under the posterior gt ( tg( )wt (ushow that gt ( tis normal density ...
14,835
given the data { xn }suppose that we use the likelihood ( thn(us with parameter th (us )and wish to compare the following two nested models (amodel where is known and this is incorporated via the prior (th ( ( ps ( - ) ( (bmodel where both mean and variance are unknown with prior (th ( ( ps ( - ) bt ( )- - - / (tshow t...
14,836
onte arlo ethods many algorithms in machine learning and data science make use of monte carlo techniques this gives an introduction to the three main uses of monte carlo simulationto ( simulate random objects and processes in order to observe their behavior( estimate numerical quantities by repeated samplingand ( solve...
14,837
randomness is introduced artificially in order to more efficiently search the domain of the objective function monte carlo techniques are also used to optimize noisy functionswhere the function itself is randomfor examplewhen the objective function is the output of monte carlo simulation the monte carlo method dramatic...
14,838
most random number generators at present are based on linear recurrence relations one of the most important random number generators is the multiple-recursive generator (mrgof order kwhich generates sequence of integers xk xk+ via the linear recurrence xt ( xt- ak xt- mod mt kk ( for some modulus and multipliers {ai kh...
14,839
distributed (as would be expected from the radial symmetryand the radius has pdf fr (rr - / moreoverr and th are independent we will see shortlyin ex ample that has the same distribution as - ln with ( soto simulate xy ~iid ( )the idea is to first simulate and th independently and then return cos(thand sin(thas pair of...
14,840
np linalg cholesky sigma randn ( ,nplt scatter ([ [ ,:],[ [ ,:]alpha = figure realizations of bivariate normal distributions with means zerovariances and correlation coefficients (leftand (rightin some casesthe covariance matrix has special structure which can be exploited to create even faster generation algorithmsas ...
14,841
inverse-transform method let be random variable with cumulative distribution function (cdff let - denote the inverse of and ( thenp[ - ( xp[ ( ) ( ( this leads to the following method to simulate random variable with cdf falgorithm inverse-transform method inputcumulative distribution function outputrandom variable dis...
14,842
algorithm acceptance-rejection method inputpdf and constant such that cg(xf (xfor all outputrandom variable distributed according to pdf found false while not found do generate from generate from ( independently of ucg( if (xthen found true return example (simulating gamma random variablessimulating random variables fr...
14,843
accrejgamma py from math import exp gamma log from numpy random import rand alpha lam lambda xlam *alpha **alpha - exp(-lam* )gamma alpha lambda exp - *xc found false while not found log(rand ())/ if * ( )*rand (< ( )found true print (xsimulating random vectors and processes techniques for generating random vectors and...
14,844
algorithm simulate markov chain inputnumber of steps ninitial pdf transition density draw from the initial pdf for to do draw xt from the distribution corresponding to the density (xt- return xn example (markov chain simulationfor time-homogeneous markov chains with discrete state spacewe can visualize the one-step tra...
14,845
[ + np min(np where (np cumsum ( [ [ ,:]np random rand ()) #add to all elements of the vector plt plot(np array range ( , )), ' 'plt plot(np array range ( , )), '--'plt show (resampling resampling the idea behind resampling is very simplean iid sample :{ xn from some unknown cdf represents our best knowledge of if we m...
14,846
figure empirical cdfs of the medians of the resampled data (left curveand sample means (right curveof the resampled data instead of sampling completely new datawe could also reuse the original data by ex eand resampling them via algorithm this gives independent copies for which we can again plot the empirical cdf the r...
14,847
markov chain monte carlo target burn-in period markov chain monte carlo (mcmcis monte carlo sampling technique for (approximatelygenerating samples from an arbitrary distribution -often referred to as the target distribution the basic idea is to run markov chain long enough such that its limiting distribution is close ...
14,848
theorem local balance for the metropolis-hastings sampler the transition density of the metropolis-hastings markov chain satisfies the detailed balance equations proofwe prove the theorem for the discrete case only because transition of the metropolis-hastings markov chain consists of two stepsthe one-step transition p...
14,849
if the proposal transition density is symmetric (that isq( xq( ))then the acceptance probability has the simple form (ya(xymin , ( (xrandom walk sampler and the mcmc algorithm is called random walk sampler typical example is whenfor given current state xthe proposal state is of the form zwhere is generated from some sp...
14,850
lambda - *pi lambda xx pi lambda exp(-sqrt( ** ** / *sin ( sqrt( ** ** ))+ )* ( )* ( )* ( )* ( xx np zeros (( , ) np zeros (( , )for in range ( , ) randn ( , alpha np amin (( ( [ ][ , [ ][ ]/ ( [ ][ , [ ][ ], ) rand (alpha * ( - )* xx[ ,: plt scatter (xx [, xx [, alpha = , = plt axis('equal 'plt show ( gibbs sampler th...
14,851
systematic gibbs sampler random-order gibbs sampler random gibbs sampler reversible gibbs sampler cycle consists of steps - in which the components are updated in fixed order for this reason algorithm is also called the systematic gibbs sampler in the random-order gibbs samplerthe order in which the components are upda...
14,852
to verify that the markov chain for the systematic gibbs sampler indeed has limiting pdf ( )we need to check that the global balance equations ( hold by integrating (in the continuous caseboth sides in ( with respect to xwe see that indeed (xq - ( xdx (yexample (gibbs sampler for the bayesian normal modelgibbs samplers...
14,853
in our parameterization of the gamma(aldistributionl is the rate parameter many software packages instead use the scale parameter / be aware of this when simulating gamma random variables the python script below defines small data set of size (which was randomly simulated from standard normal distribution)and implement...
14,854
the left panel of figure shows the (us points generated by the gibbs sampler also shownvia the white circleis the point (xs )where is the sample mean and the sample variance this posterior point cloud visualizes the considerable uncertainty in the estimates by projecting the (us points onto the -axis -that isby ignorin...
14,855
algorithm crude monte carlo for independent data inputsimulation algorithm for sample size nconfidence level outputpoint estimate and approximate ( aconfidence interval for ey iid simulate yn pn = yi pn = (yi yn- return and the interval ( monte carlo integration example (monte carlo integrationin monte carlo integratio...
14,856
estimate the test loss using test set with the same sample size figure shows that there is some variation in the test lossesdue to the randomness in both the training and test sets to obtain an accurate estimate of the expected generalization risk ( )take the average of the test losses we see that for the estimate in f...
14,857
uy generate_data (beta sig ntraining data np ones (( )for in p_range if np hstack ((xu**( - ))betahat [psolve ( xx yu_test y_test generate_data (beta sig #test data mse [x_test np ones (( )for in p_range if x_test np hstack (x_test u_test **( - ))y_hat x_test betahat [ppredictions mse append (np sum (y_test y_hat )** /...
14,858
chausenwho pulled himself out of swamp by his own bootstraps as an examplethe bootstrap estimate of the expectation of is *ey = which is simply the sample mean of {yisimilarlythe bootstrap estimate for vary is the sample variance vary (yi ) ( = pk bootstrap estimators for the bias and mse are and = (yi ) respectively n...
14,859
independently of xt - thusif we define and let be the -th time that the chain returns to state then we can break up the time interval into independent cycles of lengths ci - now suppose that during the -th cycle reward ri - % -ti- (xt = - is receivedwhere (iis some fixed reward for visiting state { and ( is discounting...
14,860
figure indicates that the true long-run average reward lies between and with high confidence more preciselythe bootstrap confidence interval (percentile methodis here ( the following python script spells out the procedure ratioest py import numpy as np matplotlib pyplot as plt seaborn as sns from numba import jit np ra...
14,861
control variable variance reduction the estimation of performance measures in monte carlo simulation can be made more efficient by utilizing known information about the simulation model variance reduction techniques include antithetic variablescontrol variablesimportance samplingconditional monte carloand stratified sa...
14,862
mcintcv py from mcint import yc np sum( ** axis = control variable data yc true expectation of control variable np cov( ,ycsample covariance matrix cor [ ][ ]np sqrt( [ ][ ] [ ][ ]alpha [ ][ ] [ ][ est np mean(yalpha *(yc -yc)recv np sqrt (( cor ** )* [ ][ ] )/est relative error print ('estimate {: }ci ({: ,{: }corr {:...
14,863
algorithm importance sampling estimation inputfunction himportance sampling density such that ( for all for which (xf ( sample size nconfidence level outputpoint estimate and approximate ( aconfidence interval for eh( )where iid simulate and let yi ( ( )/ ( ) estimate via and determine an approximate ( aconfidence inte...
14,864
for truncation level of and sample size of typical estimate is with an estimated relative error of we have two sources of error here the first is the error in approximating by ub howeveras the function decays exponentially fastb is more than enough to ensure this error is negligible the second type of error is the stat...
14,865
gfor the importance sampling density minimizes the variance of and is therefore the solution to the functional minimization program ( ( min varg (xg ( optimal importance sampling pdf it is not difficult to showsee also exercise that if either ( or ( for all xthen the optimal importance sampling pdf is (xh(xf (xu ( name...
14,866
going beyond the physical interpretationsuppose that (xis an arbitrary function to be minimizedwith taking values in some discrete or continuous set the gibbs pdf corresponding to (xis defined as gibbs pdf (xet ft (xzt xp provided that the normalization constant zt : exp(- ( )/ is finite note that this is simply the bo...
14,867
algorithm simulated annealing with random walk sampler inputobjective function starting state initial temperature number of iterations nsymmetric proposal density ( )constant outputapproximate minimizer and minimum value of for to do simulate new state from the symmetric proposal ( xt if (ys (xt then xt+ else draw ( if...
14,868
the function has many local minima and maximawith global minimum around the figure also illustrates the relationship between and the (unnormalizedgibbs pdf ft the following python code implements slight variant of algorithm whereinstead of stopping after fixed number of iterationsthe algorithm stops when the temperatur...
14,869
state number of iterations figure typical states generated by the simulated annealing algorithm cross-entropy cross-entropy method the cross-entropy (cemethod [ is simple monte carlo algorithm that can be used for both optimization and estimation the basic idea of the ce method for minimizing function on set is to defi...
14,870
components in this casethe mean vector and the vector of variances are simply updated via the sample mean and sample variance of the elite samples this is known as normal updating generic ce procedure for minimization is given in algorithm normal updating algorithm cross-entropy method for minimization inputfunction in...
14,871
of the elite samples in this case we do not use any smoothing ( in the following python code the matrix sx stores the -values in the first column and the function values in the second column the rows of this matrix are sorted in ascending order according to the function valuesgiving the matrix sortsx the first elite ro...
14,872
splitting for optimization minimizing function ( ) is closely related to drawing random sample from level set of the form { ( gsuppose has minimum value gattained at xas long as gthis level set contains the minimizer moreoverif is close to gthe volume of this level set will be small soa randomly selected point from thi...
14,873
elite dn% form the elite particle set exactly as in the ce method nextthe elite particles are "splitinto bn/ elite children particlesadding one extra child to some of the elite particles to ensure that the total number of children is again the purpose of line is to randomize which elite particles receive an extra child...
14,874
table constants for test problem - - - - - - - - - - the best known minimal value in [ was - in [ better solution was found- using genetic algorithm the corresponding solution vector was completely different from the one in [ further improvement,- was found in [ ]using the ce methodgiving similar solution vector to tha...
14,875
stochastic approximation central difference estimator the behavior of some system ( vehicles on road networkis simulated under certain parameters ( the lengths of the traffic light intervalsand the aim is to choose those parameters optimally ( to maximize the traffic throughputfor each parameter setting the exact value...
14,876
kiefer-wolfowitz algorithm in section we will see how stochastic gradient descent is employed in deep learning to minimize the training lossbased on "minibatchof training data it can be shown [ thatunder certain regularity conditions on the sequence converges to the true minimizer xwhen the step sizes decrease slowly e...
14,877
(xu (xf ( vargl (xegl ( (xn gl (xn gl (xn gl ( hencethe optimal parameter lminimizes the function (le [ (xf ( )/gl ( )]which is unknownbut can be estimated from simulation to solve this stochastic minimization problemwe first use stochastic approximation thusat each step of the algorithmthe gradient of (lis estimated f...
14,878
steps figure the stochastic optimization algorithm produces sequence lt that tends to an approximate estimate of the optimal importance sampling parameter nextwe estimate lusing stochastic counterpart approach as the objective function (lis of the form ( (with taking the role of and the role of )we obtain the sample av...
14,879
=- + * *np random rand( , =- + * *np random rand( , = ( , )** * / ( ,yestcmc np mean(zres np hstack ((res estcmc )plt plot(lams resplt xlabel ( '$lambda'plt ylabel ( '$\hat{ }(lambda )$'plt ticklabel_format style ='sci 'axis=' 'scilimits =( , )plt show ( figure the stochastic counterpart method replaces the unknown ( (...
14,880
figure noisy optimization function as black box the input to the black box is binary vector inside the black box the digits of the input vector are scrambled by flipping bits with probability th the output is the number of bits of the scrambled vector that do not match the true (unknownbinary vector denoting by (xthe t...
14,881
samples the sample size is and the number of elite samples is the components of the initial sampling vector are all equal to / that isthe are initially uniformly sampled from the set of all binary vectors of length at each subsequent iteration the parameter vector is updated via the mean of the elite samples and evolve...
14,882
cenoisy py from snoisy import snoisy import numpy as np rho nel int( *rho)eps np ones(ni pstart ps np zeros (( , )ps [ pstart pdist np zeros (( , )while np max(np minimum ( , - )epsi + (np random uniform (size =( , )pastype (intx_tmp np array (xcopy=truesx snoisy x_tmp ids np argsort (sx ,axis = elite [ids [ nel ,: np ...
14,883
fr ( for respectively(bexplain how to simulate using the inverse-transform method (csimulate independent draws of [xy]according to the method described above simple acceptance-rejection method to simulate vector in the unit -ball { rd kxk is to first generate uniformly in the hyper cube [- ] and then to accept the poin...
14,884
write program that generates and displays random vectors that are uniformly distributed within the ellipse [hintconsider generating uniformly distributed samples within the circle of radius and use the fact that linear transformations preserve uniformity to transform the circle to the given ellipse suppose that xi exp(...
14,885
(aconstruct computer program to simulate the markov chainand show realization for steps (bcompute the limiting probabilities that the markov chain is in state , , by solving the global balance equations ( (cverify that the exact limiting probabilities correspond to the average fraction of times that the markov process ...
14,886
(afind the conditional pdf of given yand the conditional pdf of given (bwrite working python code that implements the gibbs sampler and outputs points that are approximately distributed according to (cdescribe how the normalization constant could be estimated via monte carlo iid simulationusing random variables xn yn e...
14,887
one of the test cases in [ involves the minimization of the hougen function implement cross-entropy and simulated annealing algorithm to carry out this optimization task in the binary knapsack problemthe goal is to solve the optimization problemmax pxx{ , } subject to the constraints ax cwhere and are vectors of non-ne...
14,888
if and are positively correlatedthe variance of - would be smaller than if and are independent show that this is not always the case by providing counter-example (ccontinuing ( )assume now that and are continuous show that the variance of by taking common random numbers is no larger than when and are independent [hintu...
14,889
nsupervised earning when there is no distinction between response and explanatory variablesunsupervised methods are required to learn the structure of the data in this we look at various unsupervised learning techniquessuch as density estimationclusteringand principal component analysis important tools in unsupervised ...
14,890
to come from mixture of (usually gaussiandistributionsand the objective is to recover the parameters of the mixture distributions from the data the principal tool for parameter estimation in mixture models is the em algorithm section discusses more heuristic approach to clusteringwhere the data are grouped according to...
14,891
table summary of definitions for unsupervised learning (xt or tn or tn lossf ( ) ( )`(ggg ` ( ` (gggt or gt ggt or gt fixed feature vector random feature vector pdf of evaluated at the point fixed training data {xi nrandom training data {xi napproximation of the pdf loss incurred when approximating (xwith (xrisk for ap...
14,892
risk and loss in unsupervised learning the random score ( th)with (th)is of particular interest in many casesits expectation is equal to the zero vectornamelyz ( thth eth ( thg( thdx ( th( ( thdx ( thdx th th th provided that the interchange of differentiation and integration is justified this is true for large number ...
14,893
again provided that the order of differentiation and integration (expectationcan be swapped in the same wayh(this then the hessian matrix of let ( thn be the minimizer of the training loss ln (xi th)rtn (th: = where tn { xn is random training set let rbe the smallest possible crossentropy risktaken over all functionscl...
14,894
risk and loss in unsupervised learning where htn (thn : ni= (xthi thn is the hessian of rtn (that some thn between thn and thtaking expectations on both sides of ( )we obtain thn )htn (thn )(thb thn (thertn ( thn (thb replacing htn (thn with (thfor large and using ( )we have (thb thn )htn (thn )(thb thn -tr (thh- (thn ...
14,895
in other wordsthe maximum likelihood estimate th for th is obtained by solving the root of the average score functionthat isby solving st (th ( it is often not possible to find th in an explicit form in that case one needs to solve the equation ( numerically there exist many standard techniques for root-findinge via ne...
14,896
expectation-maximization (emalgorithm the expectation-maximization algorithm (emis general algorithm for maximization of complicated (log-)likelihood functionsthrough the introduction of auxiliary variables to simplify the notation in this sectionwe use bayesian notation systemwhere the same symbol is used for differen...
14,897
the first optimization problem can be solved explicitly namelyby ( )we have that (targmin (pg(tth( - ) (tth( - that isthe optimal density is the conditional density of the latent variables given the data and the parameter th( - the second optimization problem can be simplified by writing ( (tthq( (the (tln ( ( )where (...
14,898
example (censored datasuppose the lifetime (in yearsof certain type of machine is modeled via (us distribution to estimate and the lifetimes of (independentmachines are recorded up to years denote these censored lifetimes by xn the {xi are thus realizations of iid random variables {xi }distributed as min{yc}where (us b...
14,899
-step given the current estimate tht :[ut ]compute the expectations nt :ez and zt : ( ut ) where (ut )conditional on cthat isphs ( ut nt :ut ph(( ut )/st phs ( ut zt :st ( ut ph(( ut )/st -step update the estimate to tht+ :[ut+ + ]via the formulasp nc nt :xi < xi ut+ np :xi < (xi ut+ + empirical distribution and densit...