Class01 Lab Answer:

As Product Manager, Enhance mlcl2

The data used by mlcl2 are simple measurements of flowers.

I find the data uninteresting compared to data about sports or stock market behavior.

As Product Manager, the only kind of user I act for is the Machine Learning student.

From that perspective, some enhancements to mlcl2 are easy to see:

I implemented the above enhancements in the repo listed below:

https://github.com/danbikle/mlcl3

I cloned the above repo and operated it:


dan@e80:~ $ 
dan@e80:~ $ git clone https://github.com/danbikle/mlcl3
Cloning into 'mlcl3'...
remote: Counting objects: 41, done.        
remote: Compressing objects: 100% (20/20), done.        
remote: Total 41 (delta 18), reused 41 (delta 18), pack-reused 0        
Unpacking objects: 100% (41/41), done.
Checking connectivity... done.
dan@e80:~ $ 
dan@e80:~ $ cd mlcl3

dan@e80:~/mlcl3 $ 
dan@e80:~/mlcl3 $ ./slice_learn_predict2.bash 
Train Data should be here: /tmp/iris_train.csv
Test  Data should be here: /tmp/iris_test.csv
Predictions should be here: /tmp/iris_predictions.csv
A comparison of observed values (f1) and predictions:
    f0   f2   f3  iris_type   f1  prediction  difference  diff_squared
0  5.5  3.8  1.1          1  2.4        2.78       -0.38        0.1444
1  5.7  4.2  1.3          1  2.9        2.80        0.10        0.0100
2  6.4  4.5  1.5          1  3.2        3.16        0.04        0.0016
3  5.1  1.5  0.2          0  3.4        3.36        0.04        0.0016
4  5.4  1.7  0.2          0  3.4        3.43       -0.03        0.0009
5  6.9  5.1  2.3          2  3.1        3.53       -0.43        0.1849
6  5.4  1.7  0.4          0  3.9        3.55        0.35        0.1225
7  5.0  3.5  1.0          1  2.0        2.59       -0.59        0.3481
8  6.3  4.4  1.3          1  2.3        3.04       -0.74        0.5476
9  7.0  4.7  1.4          1  3.2        3.34       -0.14        0.0196
The square-root of the mean of differences-squared:
0.371644991894
Acronym for above calculation is "RMSE".
For me, RMSE is a good way to compare observed values and predictions.
If RMSE is zero, the predictions are probably accurate.
dan@e80:~/mlcl3 $ 
dan@e80:~/mlcl3 $


dan@e80:~/mlcl3 $
dan@e80:~/mlcl3 $ ./slice_learn_predict3.bash
Train Data should be here: /tmp/iris_train.csv
Test  Data should be here: /tmp/iris_test.csv
    f0   f1   f2   f3  iris_type         predictions  predicted_type accurate
0  5.0  3.5  1.3  0.3          0     [0.9, 0.1, 0.0]               0     True
1  5.5  2.6  4.4  1.2          1  [0.01, 0.57, 0.42]               1     True
2  5.4  3.0  4.5  1.5          1  [0.01, 0.33, 0.66]               2    False
3  6.3  2.3  4.4  1.3          1  [0.01, 0.76, 0.23]               1     True
4  6.3  2.8  5.1  1.5          2   [0.0, 0.48, 0.52]               2     True
5  5.7  2.8  4.5  1.3          1  [0.01, 0.55, 0.44]               1     True
6  5.8  2.8  5.1  2.4          2   [0.0, 0.17, 0.83]               2     True
7  5.1  3.5  1.4  0.2          0   [0.88, 0.12, 0.0]               0     True
8  6.0  2.2  5.0  1.5          2   [0.0, 0.47, 0.53]               2     True
9  5.8  2.6  4.0  1.2          1  [0.04, 0.78, 0.18]               1     True
percent accuracy:
90.0
dan@e80:~/mlcl3 $ 
dan@e80:~/mlcl3 $

Class01 Lab


learn4.us About Blog Contact Class01 Class02 Class03 Class04 Class05 Class06 Class07 Class08 Class09 Class10 dan101 Forum Google Hangout Vboxen