moodlehq / moodle-mlbackend-python

Moodle machine learning backend
GNU General Public License v3.0
18 stars 19 forks source link

Faster, more accurate, future compatible ML with keras #28

Closed douglasbagnall closed 4 years ago

douglasbagnall commented 4 years ago

This goes on top of (and incorporates) #24 and #27.

Using tensorflow.keras involves quite a rewrite but gives better results more quickly, and is compatible with current versions of tensorflow.

The main benefit is probably from using the rmsprop optimiser.

Animating the 'stashed_evaluation_long' test (which is skipped by default), shows this more than twice as fast as #27, with significantly better results (0.91 vs 0.88).

tests branch (#24)

score:           0.8792510372206053
score_deviation: 0.0014586004363911559
precision:       0.8783788887713069
recall:          0.8802529311026216
accuracy:        0.8802529311026216
duration:        514.89

a-way-forward (#27)

score:           0.8805965724491545
score_deviation: 0.00257409437796892
precision:       0.879949617761934
recall:          0.8813068106968779
accuracy:        0.8813068106968779
duration:        100.94

keras-a-way-forward

score:           0.9129075350410933
score_deviation: 0.0028121235005907877
precision:       0.9161649256330499
recall:          0.9112984674834234
accuracy:        0.9112984674834234
duration:        43.38
douglasbagnall commented 4 years ago

In #31.