
'''
====CAML v0.1====
cschwal's assisted machine learning suite for RODEO

'''
print(__doc__)

import svm_sample
import svm_optimize
import svm_classify

invalidinp = True

def main():
    print 'Indicate which stage of SVM classification to perform:\n 1...splitting data set into training and fitting\n 2...optimizing hyperparameters\n 3...classification of main data set\n 0...exit\n'

    stageinput = int(input('indicate task: \n'))
    #print type(stageinput)

    if (stageinput == 1) or (stageinput == 2) or (stageinput == 3) or (stageinput == 0):
        if stageinput == 1:
            print 'selecting training set...\n'
            svm_sample.main()
            invalidinp = False
        elif stageinput == 2:
            print 'optimizing hyperparameters...\n'
            svm_optimize.main()
            invalidinp = False
        elif stageinput == 3:
            print 'classifying data...\n'
            svm_classify.main()
            invalidinp = False
        elif stageinput == 0:
            exit()
    else:
        print 'INPUT ERROR\n'

while invalidinp:
    main()
