Class01 Lab Answer:

Inside your VirtualBox, Clone mlcl2 repo

I did this lab and it was easy.

I issued some shell commands:


cd ~
git clone https://github.com/danbikle/mlcl2
cd mlcl2
ls -la

Next I operated it:


dan@e80:~/mlcl2 $ 
dan@e80:~/mlcl2 $ ls -la
total 40
drwxrwxr-x  3 dan dan 4096 Nov 26 13:22 .
drwxr-xr-x 65 dan dan 4096 Nov 28 14:25 ..
-rw-rw-r--  1 dan dan  815 Nov 25 19:18 compare.py
drwxrwxr-x  8 dan dan 4096 Nov 28 14:46 .git
-rw-rw-r--  1 dan dan 3823 Nov 25 15:22 iris.csv
-rw-rw-r--  1 dan dan  771 Nov 25 18:57 learn.py
-rw-rw-r--  1 dan dan 1082 Nov 25 18:58 predict.py
-rw-rw-r--  1 dan dan 2480 Nov 25 19:22 readme.txt
-rwxrwxr-x  1 dan dan  411 Nov 25 16:55 slice_learn_predict.bash
-rw-rw-r--  1 dan dan  676 Nov 25 18:57 slice_train_test.py
dan@e80:~/mlcl2 $ 
dan@e80:~/mlcl2 $ 

dan@e80:~/mlcl2 $ 
dan@e80:~/mlcl2 $ ./slice_learn_predict.bash
Train Data should be here: /tmp/iris_train.csv
Test  Data should be here: /tmp/iris_test.csv
Model saved to: /tmp/iris_model.csv
Predictions should be here: /tmp/iris_predictions.csv
A comparison of observed values (f1) and predictions:
    f0   f1  prediction  difference  diff_squared
0  6.7  3.1        3.02        0.08        0.0064
1  6.9  3.1        3.01        0.09        0.0081
2  5.8  2.7        3.07       -0.37        0.1369
3  6.8  3.2        3.01        0.19        0.0361
4  6.7  3.3        3.02        0.28        0.0784
5  6.7  3.0        3.02       -0.02        0.0004
6  6.3  2.5        3.04       -0.54        0.2916
7  6.5  3.0        3.03       -0.03        0.0009
8  6.2  3.4        3.05        0.35        0.1225
9  5.9  3.0        3.07       -0.07        0.0049
The square-root of the mean of differences-squared:
0.261954194469
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:~/mlcl2 $ 
dan@e80:~/mlcl2 $ 

Class01 Lab


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