LAB TIME CS109A, P ROTOPAPAS , R ADER , T ANNER 1 Lab #4: - - PowerPoint PPT Presentation

lab time
SMART_READER_LITE
LIVE PREVIEW

LAB TIME CS109A, P ROTOPAPAS , R ADER , T ANNER 1 Lab #4: - - PowerPoint PPT Presentation

LAB TIME CS109A, P ROTOPAPAS , R ADER , T ANNER 1 Lab #4: Demonstration of Dataset Splits CS109A Introduction to Data Science Pavlos Protopapas, Kevin Rader, and Chris Tanner 2 We are given this data and can do whatever we want with it.


slide-1
SLIDE 1

CS109A, PROTOPAPAS, RADER, TANNER

1

LAB TIME

slide-2
SLIDE 2

CS109A Introduction to Data Science

Pavlos Protopapas, Kevin Rader, and Chris Tanner

Lab #4: Demonstration of Dataset Splits

2

slide-3
SLIDE 3

CS109A, PROTOPAPAS, RADER, TANNER

3

  • We are given this data and can do whatever we want with it.

60 observations

Data

slide-4
SLIDE 4

CS109A, PROTOPAPAS, RADER, TANNER

4

60 observations

Data Training Data

  • We are given this data and can do whatever we want with it.
  • We can use it to train a model!
slide-5
SLIDE 5

CS109A, PROTOPAPAS, RADER, TANNER

5

60 observations

Data Training Data

  • We are given this data and can do whatever we want with it.
  • We can use it to train a model!
  • The assumption is that there exists some other, hidden data

elsewhere for us to apply our model on. During the training of

  • ur model, we never have access to it.

10 obs.

Testing Data

slide-6
SLIDE 6

CS109A, PROTOPAPAS, RADER, TANNER

6

60 observations

Data Training Data

  • The assumption (and hope) is that our training data is

representative of the ever-elusive testing data that our trained model will use

10 obs.

Testing Data

slide-7
SLIDE 7

CS109A, PROTOPAPAS, RADER, TANNER

7

60 observations

Data Training Data

  • The assumption (and hope) is that our training data is

representative of the ever-elusive testing data that our trained model will use

  • Let’s say that our model performed poorly on the testing data.

What are possible causes?

10 obs.

Testing Data

slide-8
SLIDE 8

CS109A, PROTOPAPAS, RADER, TANNER

8

60 observations

Data Training Data

  • The assumption (and hope) is that our training data is

representative of the ever-elusive testing data that our trained model will use

  • Let’s say that our model performed poorly on the testing data.

What are possible causes?

  • How do we know our trained model was trained well?

10 obs.

Testing Data

slide-9
SLIDE 9

CS109A, PROTOPAPAS, RADER, TANNER

9

60 observations

Data Training Data

  • The assumption (and hope) is that our training data is

representative of the ever-elusive testing data that our trained model will use

  • Let’s say that our model performed poorly on the testing data.

What are possible causes?

  • How do we know our trained model was trained well?

– Let’s make a synthetic “test” set from our training, for evaluation purposes

10 obs.

Testing Data

slide-10
SLIDE 10

CS109A, PROTOPAPAS, RADER, TANNER

10

Training Data

10 obs.

Testing Data

55 obs. 5 obs.

Validation Data

  • Now we at least have some feedback as to our model’s

performance before we deem the model to be final.

slide-11
SLIDE 11

CS109A, PROTOPAPAS, RADER, TANNER

11

Training Data

10 obs.

Testing Data

55 obs. 5 obs.

Validation Data

  • Now we at least have some feedback as to our model’s

performance before we deem the model to be final.

  • “Validation Set” is also called “Development Set”
  • But some of the same issues exist
slide-12
SLIDE 12

CS109A, PROTOPAPAS, RADER, TANNER

12

Training Data

10 obs.

Testing Data

55 obs. 5 obs.

Validation Data

  • Validation set may be small. Training set may be small.
  • In order to (1) train on more data, and; (2) have a more accurate,

thorough assessment of our model’s performance, we can use ALL

  • f our training data as validation data (in a round-robin fashion)
  • This is cross-validation
slide-13
SLIDE 13

CS109A, PROTOPAPAS, RADER, TANNER

13

Training Data

10 obs.

Testing Data Validation Data Run # 1 x1 – x55 x56 – x60 For a specific parameterization of a model m: 2 x1 – x50;x56 – x60 x51 – x55 11 x6 – x60 x1 – x5

. . .

slide-14
SLIDE 14

CS109A, PROTOPAPAS, RADER, TANNER

14

  • Perform all k runs (k-fold cross validation) for each model m that

you care to investigate. Average the k performances

  • Pick the model m that gives the highest average performance
  • Retrain that model on all of the original training data that you

received (e.g., all 60 observations)