quizz1 Flashcards
what is machine learning?
- design and analysis of algorthms
2.that enables computers to learn - without programming
input, output of ml algorithm supervised
- input> input data
- output predcition
3.in the ML algortihm they train (algortihm, train data)
4.the prediction later is evaluated and move to training - then deploy
taxonomy of machine learning
- supervised learning (labeled data): regression, classification
2.unsupervised learning (unlabeled data): dimensionality reduction and clustering
artificial intelligence
deep learning
neural nets
machine learning
supervised learning
- inferr a function
- from labeled training data
- develop predictive model based on input anad output data
machine learning pipeline
- define task (separate dogs and cats)
2.colllect data:train and test (80/20)
3.design features (nose, number of legs)
4.train model
5.test models
regression vs classification quizz
- who is covid 19 positive and who is not—> classification
- how many customers will buy product —> regression
unsupervised learning
- no direct learning signal
- find structure in data
- example> mickey mouse, donalds duck and bad bunny bunny
4.thik of clusters/groups - internal representation from input data only (no output data)
unsupervised learning vs supervised quizz
- email spam/non spam: supervised-classification
2.given a set of internet pages and group them into categories—unsupervised/clusters
3.givena database of patient data, divide into subtypes and group them—unsupervised/clusters
4.classify into covid 19 or not—-supervised/classification
unit vectors
- v/||v||=(x1/||v|| , x2/||v||)
orientation unit vectors
tita=arctg(x2/x1)
magnitude of vectors
if v=(x1,x2) then ||v||=sqrt(x1 al 2+ x2 al 2)
regression
- when output you are trying to predict is a continuous-valued number
classification
- when output you are trying to predicr is a categorical quantity
the framework of regression
- the hypothesis maps x(size house) and y (price house)
hypothesis
- tita 0+tita 1 x
- find both tita so that y=hipothesis
cost function
- sum: predicted value hypothesis-y true value al cuadrado
linear regression cost function
- 1/2m sum:(h-y)al 2 , con m=number of dtaa samples
strategy 1 of regression
- give J start eith tita1, 0
- iteraitve process, update tittas until reduces J
gradient descent algorithm
- titta 1 (k+1)=tita 1(k)- alfa derivada parcial J con repsecto tita 1
- tita 1=current guess tita 1
- alfa= how fast to descend, learning rate
- derivate:in which direction
what happens when alfa is too large?
- divergence may happen
- it might never converge
alfa-linear regression
- its a fixed value
gradient descend- tita 1, 2
- update both of them simultaneously
- if you do sequentially its called coordinate descent
linear regression vs gradient descent
- linear regression: j and hypothesis
- gradient: tita1, 0 ; alfa adn dreivate j
gradient descent in linear regression
- guaranteees that the local minmun is the global minmum
- it uses a convex fucntion
normalization for multiple features
- note that each feature is on a different scale
- x-xmin/(xmax-xmin)—used in pixels and can have outliers. SE HACE POR COLUMNAS NO FILAS
- x-media/desvio—more robust to outliers
improving gradient escent: learning rate
- j must be reducing
- if tita stops changing mcuh you can termiante graident
- if j is increasinf, reduce alfa
4.
alfa too large and small
- too large may not converge, j goes upward
- too small goes slow convergence