Skip to content

SVR, kernels, confidence levels, more (automated) unit testing

Compare
Choose a tag to compare
@jeff1evesque jeff1evesque released this 15 Sep 12:20
· 4938 commits to master since this release

This release encompasses issues pertaining to milestone 0.4.

Now users can perform support vector regression (SVR) analysis (with returned r^2), while having the flexibility to choose which kernel to employ, both on the webform, or programmatic api:

  • linear
  • rbf
  • polynomial
  • sigmoid

This flexibility is also made available for support vector machine (SVM) analysis, which now returns confidence level and decision function measures. Additionally, users can submit a url reference as their dataset, via the webform, or the programmatic api.

To correspond to the above changes, we've had to refactor our flask implementation to include app factory notation. This allows the travis ci to leverage necessary components to perform automated unit testing, when code is committed within the github repository, as noted within the official docker wiki page, under How to incorporate python unit testing.... Specifically, both the manual, and automated unit testing now covers the additional SVR case, which can be executed manually:

$ cd /path/to/machine-learning/
$ vagrant up
$ vagrant ssh
vagrant@vagrant-ubuntu-trusty-64:~$ (cd /vagrant/test && pytest manual)
================================================= test session starts ==================================================
platform linux2 -- Python 2.7.6, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
rootdir: /vagrant/test/manual, inifile: pytest.ini
plugins: flask-0.10.0
collected 16 items

manual/programmatic_interface/dataset_url/pytest_svm_dataset_url.py ....
manual/programmatic_interface/dataset_url/pytest_svr_dataset_url.py ....
manual/programmatic_interface/file_upload/pytest_svm_file_upload.py ....
manual/programmatic_interface/file_upload/pytest_svr_file_upload.py ....

============================================== 16 passed in 58.60 seconds ==============================================

Also, some other changes have been implemented. For example, configurations stored within settings.py have been ported to several standardized yaml files (puppet also requires an intermediate hiera.yaml). This flexibility allows both the application, and provisioner (i.e. puppet) to utilize consistent constant application settings. Of course, we added yaml linting in the .travis.yml.

Additionally, we increased flexibility of the Vagrantfile, such that vagrant destroy removes all cached files (including from pytest), and added a python Logger class, allowing exceptions to be logged into desired custom log files. Specifically, this added feature is intended to make debugging easier, since the flask application currently runs as a background service, which means typical error messages will print in an unseen background. Finally, the travis ci button at the top of the README.md is premised only on the master branch.