Overview - Columbia University · Overview 2019 24 Overview I rning? I rning 24 I I image I I ren,...

7
Overview COMS 4771 Fall 2019 0 / 24 Overview What is machine learning? Basic topics/challenges in machine learning 1 / 24 Applications I Image classification: Predict bird species depicted in image 2 / 24 Applications II Recommender systems: Predict how user would rate a movie (Koren, Bell, and Volinsky, 2009) Geared toward males Serious Escapist The Princess Diaries Braveheart Lethal Weapon Independence Day Ocean’s 11 Sense and Sensibility Gus Dave Geared toward females Amadeus The Lion King Dumb and Dumber The Color Purple 3 / 24

Transcript of Overview - Columbia University · Overview 2019 24 Overview I rning? I rning 24 I I image I I ren,...

Page 1: Overview - Columbia University · Overview 2019 24 Overview I rning? I rning 24 I I image I I ren, 2009) R E 44 R q i ! f r u i - p u ! fm if q i o , u , p u of h si -, q i T p u

Overview

COMS 4771 Fall 2019

0 / 24

Overview

I What is machine learning?I Basic topics/challenges in machine learning

1 / 24

Applications I

I Image classification: Predict bird species depicted in image

2 / 24

Applications II

I Recommender systems: Predict how user would rate a movie (Koren,Bell, and Volinsky, 2009)COVER FE ATURE

COMPUTER 44

vector qi R f, and each user u is associ-ated with a vector pu R f. For a given item i, the elements of qi measure the extent to which the item possesses those factors, positive or negative. For a given user u, the elements of pu measure the extent of interest the user has in items that are high on the corresponding factors, again, posi-tive or negative. The resulting dot product, qi

T pu, captures the interaction between user u and item i—the user’s overall interest in the item’s characteristics. This approximates user u’s rating of item i, which is denoted by rui, leading to the estimate

r̂ui

= qiT pu. (1)

The major challenge is computing the map-ping of each item and user to factor vectors qi, pu R f. After the recommender system completes this mapping, it can easily esti-mate the rating a user will give to any item by using Equation 1.

Such a model is closely related to singular value decom-position (SVD), a well-established technique for identifying latent semantic factors in information retrieval. Applying SVD in the collaborative filtering domain requires factoring the user-item rating matrix. This often raises difficulties due to the high portion of missing values caused by sparse-ness in the user-item ratings matrix. Conventional SVD is undefined when knowledge about the matrix is incom-plete. Moreover, carelessly addressing only the relatively few known entries is highly prone to overfitting.

Earlier systems relied on imputation to fill in missing ratings and make the rating matrix dense.2 However, im-putation can be very expensive as it significantly increases the amount of data. In addition, inaccurate imputation might distort the data considerably. Hence, more recent works3-6 suggested modeling directly the observed rat-ings only, while avoiding overfitting through a regularized model. To learn the factor vectors (pu and qi), the system minimizes the regularized squared error on the set of known ratings:

min* *,q p ( , )u i

(rui qiTpu)

2 + (|| qi ||2 + || pu ||

2) (2)

Here, is the set of the (u,i) pairs for which rui is known (the training set).

The system learns the model by fitting the previously observed ratings. However, the goal is to generalize those previous ratings in a way that predicts future, unknown ratings. Thus, the system should avoid overfitting the observed data by regularizing the learned parameters, whose magnitudes are penalized. The constant controls

recommendation. These methods have become popular in recent years by combining good scalability with predictive accuracy. In addition, they offer much flexibility for model-ing various real-life situations.

Recommender systems rely on different types of input data, which are often placed in a matrix with one dimension representing users and the other dimension representing items of interest. The most convenient data is high-quality explicit feedback, which includes explicit input by users regarding their interest in products. For example, Netflix collects star ratings for movies, and TiVo users indicate their preferences for TV shows by pressing thumbs-up and thumbs-down buttons. We refer to explicit user feedback as ratings. Usually, explicit feedback com-prises a sparse matrix, since any single user is likely to have rated only a small percentage of possible items.

One strength of matrix factorization is that it allows incorporation of additional information. When explicit feedback is not available, recommender systems can infer user preferences using implicit feedback, which indirectly reflects opinion by observing user behavior including pur-chase history, browsing history, search patterns, or even mouse movements. Implicit feedback usually denotes the presence or absence of an event, so it is typically repre-sented by a densely filled matrix.

A BASIC MATRIX FACTORIZATION MODEL Matrix factorization models map both users and items

to a joint latent factor space of dimensionality f, such that user-item interactions are modeled as inner products in that space. Accordingly, each item i is associated with a

Gearedtowardmales

Serious

Escapist

The PrincessDiaries

Braveheart

Lethal Weapon

IndependenceDay

Ocean’s 11Sense andSensibility

Gus

Dave

Gearedtoward

females

Amadeus

The Lion King Dumb andDumber

The Color Purple

Figure 2. A simplified illustration of the latent factor approach, which characterizes both users and movies using two axes—male versus female and serious versus escapist.

3 / 24

Page 2: Overview - Columbia University · Overview 2019 24 Overview I rning? I rning 24 I I image I I ren, 2009) R E 44 R q i ! f r u i - p u ! fm if q i o , u , p u of h si -, q i T p u

Applications III

I Machine translation: Predict French translation of English sentence(Google translate)

4 / 24

Applications IV

I Chess: Predict win probability of a move in given game state(AlphaZero)

5 / 24

Work in ML

I Applied MLI Collect/prepare data, build/train models, analyze errors

I ML developerI Implement ML algorithms and infrastructure

I ML researchI Design/analyze models and algorithms

6 / 24

Mathematical and computational prerequisites

I MathI Linear algebra, probability, multivariable calculus, reading and writing

proofsI Software/programming

I Much ML work is implemented in python with libraries such as numpyand pytorch

7 / 24

Page 3: Overview - Columbia University · Overview 2019 24 Overview I rning? I rning 24 I I image I I ren, 2009) R E 44 R q i ! f r u i - p u ! fm if q i o , u , p u of h si -, q i T p u

Basic setting: supervised learning

I Training data: dataset comprised of labeled examplesI Labeled example: a pair (input, label)

I Goal: learn function to predict label from input for new examples

learned predictorpast labeled examples learning algorithm

predicted label

new (unlabeled) example

Figure 1: Schematic for supervised learning

8 / 24

Examples of functions I

I Decision tree

9 / 24

Examples of functions II

I Linear classifier

10 / 24

Examples of functions III

I Neural network

input hidden units output

11 / 24

Page 4: Overview - Columbia University · Overview 2019 24 Overview I rning? I rning 24 I I image I I ren, 2009) R E 44 R q i ! f r u i - p u ! fm if q i o , u , p u of h si -, q i T p u

Types of prediction problems

I Binary classificationI Given an email, is it spam or not?I (What’s the probability that it is spam?)

I Multi-class classificationI Given an image, what animal is depicted?I (Or which animals are depicted?)

I RegressionI Given clincal measurements, what is level of tumor antigens?I (In absolute level? Log-scale?)

I Structured output predictionI Given a sentence, what is its grammatical parse tree?I (Or dependency tree?)

I . . .

12 / 24

Beyond supervised learning

I Unsupervised learning / probabilistic modelingI Online learningI Reinforcement learning

13 / 24

Challenges in supervised learning

I Might not have the right dataI Might pick a bad modelI Might not fit training data well (under-fitting)I Might fit the training data too well (over-fitting)I Training data could be noisy / corrupted (robustness)I . . .

14 / 24

Example: over-fitting

I Which polynomial degree to use?I Truth: y = 0 · x + noiseI Red points: training dataI Green points: unseen data

0.0 0.2 0.4 0.6 0.8 1.01.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00R1 = 0.00692304, R1 = 0.00897457, R2 = 0.00690718, R2 = 0.00870077

15 / 24

Page 5: Overview - Columbia University · Overview 2019 24 Overview I rning? I rning 24 I I image I I ren, 2009) R E 44 R q i ! f r u i - p u ! fm if q i o , u , p u of h si -, q i T p u

Example: over-fitting

I Which polynomial degree to use?I Truth: y = 0 · x + noiseI Red points: training dataI Green points: unseen data

0.0 0.2 0.4 0.6 0.8 1.01.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00R1 = 0.00692304, R1 = 0.00897457, R3 = 0.0064944, R3 = 0.00998528

16 / 24

Example: over-fitting

I Which polynomial degree to use?I Truth: y = 0 · x + noiseI Red points: training dataI Green points: unseen data

0.0 0.2 0.4 0.6 0.8 1.01.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00R1 = 0.00692304, R1 = 0.00897457, R4 = 0.0062397, R4 = 0.013063

17 / 24

Example: over-fitting

I Which polynomial degree to use?I Truth: y = 0 · x + noiseI Red points: training dataI Green points: unseen data

0.0 0.2 0.4 0.6 0.8 1.01.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00R1 = 0.00692304, R1 = 0.00897457, R5 = 0.00582684, R5 = 0.00975194

18 / 24

Example: over-fitting

I Which polynomial degree to use?I Truth: y = 0 · x + noiseI Red points: training dataI Green points: unseen data

0.0 0.2 0.4 0.6 0.8 1.01.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00R1 = 0.00692304, R1 = 0.00897457, R6 = 0.00571136, R6 = 0.0142185

19 / 24

Page 6: Overview - Columbia University · Overview 2019 24 Overview I rning? I rning 24 I I image I I ren, 2009) R E 44 R q i ! f r u i - p u ! fm if q i o , u , p u of h si -, q i T p u

Example: over-fitting

I Which polynomial degree to use?I Truth: y = 0 · x + noiseI Red points: training dataI Green points: unseen data

0.0 0.2 0.4 0.6 0.8 1.01.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00R1 = 0.00692304, R1 = 0.00897457, R7 = 0.00565266, R7 = 0.0282631

20 / 24

Example: over-fitting

I Which polynomial degree to use?I Truth: y = 0 · x + noiseI Red points: training dataI Green points: unseen data

0.0 0.2 0.4 0.6 0.8 1.01.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00R1 = 0.00692304, R1 = 0.00897457, R8 = 0.00564127, R8 = 0.0440347

21 / 24

Example: over-fitting

I Which polynomial degree to use?I Truth: y = 0 · x + noiseI Red points: training dataI Green points: unseen data

0.0 0.2 0.4 0.6 0.8 1.01.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00R1 = 0.00692304, R1 = 0.00897457, R9 = 0.00541878, R9 = 0.42463

22 / 24

Example: the right data

I Given a college applicant, will they graduate if admitted?I What is appropriate training data?

I input = past applicant; label = admitted or notI input = past admit; label = graduated or notI input = past applicant; label = graduated or not

23 / 24

Page 7: Overview - Columbia University · Overview 2019 24 Overview I rning? I rning 24 I I image I I ren, 2009) R E 44 R q i ! f r u i - p u ! fm if q i o , u , p u of h si -, q i T p u

Overview of the rest of the course

I Non-parametric methodsI Simple and flexible methods for prediction

I Prediction theoryI Statistical model for studying prediction problems

I RegressionI Models and methods for predicting real-valued outcomesI Inductive bias, features, kernels

I ClassificationI Models and methods for predicting discrete-valued outcomesI Surrogate losses, margins, cost-sensitive risk, fairness, ensemble

methodsI Optimization

I Convex optimization and neural network trainingI Unsupervised learning

I Methods for clustering and matrix approximation

24 / 24