Skip to content

Instantly share code, notes, and snippets.

@hnlee
hnlee / paper-discussion-201910-resources-02.md
Last active September 20, 2019 03:00
Measuring ML performance

Measuring machine learning performance

Loss function

Loss function: measures the difference between prediction and reality, i.e. the accuracy of the model

  • Remember: when training a model, we use an optimization algorithm to pick parameters that minimize the loss function
  • The same loss function can be used to measure the model's performance against the test set
  • In a way, minimax is a loss function!

What kinds of loss functions are there?

@hnlee
hnlee / paper-discussion-201910-resources-01.md
Last active September 18, 2019 20:07
What is a classifier?

What is a classifier?

Most of the following is paraphrased from Elements of Statistical Learning, which is available as a PDF.

Variables can be inputs or outputs

  • Inputs can also be called: predictors, independent variables, features
  • Outputs can also be called: responses, dependent variables

Variables can be quantitative or qualitative

  • Qualitative variables are also known as categorical variables, discrete variables, factors
### Keybase proof
I hereby claim:
* I am hnlee on github.
* I am hanalee (https://keybase.io/hanalee) on keybase.
* I have a public key ASDBAeXwtNcoxKDFAZEWBgo7wLYpKwDIcVhV0SLdZyXapAo
To claim this, I am signing this object:

Python 101

Generators

This is a generator statement:

[ a['name'] for a in actors if a['born'] < datetime.datetime(1976, 1, 1) ]

A generator iterates on a set of data and can select out modified components, sometimes based on criteria. In this case, this code lists out actors from an array of actor dictionaries where the actor was born before 1976.