bertdv / AIP-5SSB0

5SSB0 -- Adaptive Information Processing course notes
Other
11 stars 5 forks source link

lesson 8 -- add code example for discriminative classification #22

Closed bertdv closed 8 years ago

bertdv commented 9 years ago

see class

marcocox commented 8 years ago

@bertdv A small remark/question about this one. In order to get a nice plot (decision boundary not passing through the origin per definition) I have to add a constant to the feature vector x (so θ becomes 3-dimensional). Since this is not described in the notebook, I see three options:

  1. Add some text to the notebook to explain why one needs to add a constant to the feature vector to shift the decision boundary in the feature space. Without the explanation, the code will be quite confusing.
  2. Leave out the explanation, and put the example code (which is not so short anyway) in a separate file. In the notebook, only call a function to generate the plot. The plot is very useful even without the code directly in the notebook, and we prevent cluttering the explanation with these details. The code file contains comments anyway.
  3. (Not my preference) craft the data-set in such a way that the decision boundary would (almost) pass through the origin anyway, so nobody will notice.

The current version of the demo is in a separate file: lessons/08_discriminative_classification/discriminative-classification-demo.jl.

bertdv commented 8 years ago

I think I prefer option 1.

marcocox commented 8 years ago

This code example is done, you can review it if you want.

bertdv commented 8 years ago

great job!