becausethepointofthiscourseistohelpyoubuild a solidmathematicalintuitionaroundbuildingalgorithmsthatcanlearnfromdata.
I meanlet's faceit, youcouldjustuse a blackboxAPIforallthisstuff, butifyouhavetheintuitionyou'llhavetheintuitionyou'llknowexactlywhichalgorithmtouseforthejoborevencustommakeyourownfromscratch.
Wasitconvexorconcavefunctionsthatwereeasiertooptimize? I thinkconvex. I reallyhopemylabpartnerisepicatoptimization.
I guess I shouldbethankful, notmanydatascientistsget a grantfromCERNtodetecttheHiggs-Boson.
Whatwashernameagain? Eloise, I think. Yup, shedidwinanawardatICML. I wonderifshe’s cute?
No, thatdoesn’t matter. I amnotgoingtomixbusinessandpleasure, notthistime.
Suppose I’vegot a bunchofdatapoints. Thesearejusttoydatapoints, likewhatAppleprobablytrainedSirion.
They’reall x-y valuepairswhere x representsthedistance a personbikes,
and y representstheamountofcaloriestheylost. Wecanjustplotthemon a graphlikeso.
Wewanttobeabletopredictthecalorieslostfor a newpersongivingtheirbikingdistance.
Howshouldwedothis? Wellwecouldtrytodraw a linethatfitsthroughallthedatapointsbutitseemslikeourpointsaretoospacedoutfor a straightlinetopassthroughallofthem.
Sowecansettlefordrawingthelineofbestfit, a linethatgoesthroughasmanydatapointsaspossible.
Algebratellsusthattheequationfor a straightlineisoftheform y = mx+ b.
Where m representstheslopeorsteepnessofthelineand b representsit’s y-axisinterceptpoint.
Wewanttofindtheoptimalvaluesfor b and m suchthat
linefitsasmanypointsaspossible, sogivenanynew x value, wecanplugitintoourequationandit’lloutputthemostlikely y value.
Ourerrormetriccanbe a measureofcloseness, whichwecandefinelikethis. Soletsstartoffwith a random b and m valueandplotthisline.
Foreverysingledatapointwehave, letscalculateitsassociated y valueinouralreadyrandomlydrawnline.
Thenwe’llsubtracttheactual y valuefromittomeasurethedistancebetweenthetwo.