resultor - resultor class

The file yann.modules.resultor.py contains the definition for the resultor:

class yann.modules.resultor.resultor(resultor_init_args, verbose=1)[source]

Resultor of the network saves down resultor. The initilizer initializes the directories for storing results.

Parameters:
  • verbose – Similar to any 3-level verbose in the toolbox.
  • resultor_init_args

    resultor_init_args is a dictionary of the form

    resultor_init_args    =    {
        "root"      : "<root directory to save stuff inside>",
        "results"   : "<results_file_name>.txt",
        "errors"    : "<error_file_name>.txt",
        "costs"     : "<cost_file_name>.txt",
        "learning_rate" : "<learning_rate_file_name>.txt"
        "momentum"  : <momentum_file_name>.txt
        "visualize" : <bool>
        "save_confusion" : <bool>
        "id"        : id of the resultor
                    }
    

    While the filenames are optional, root must be provided. If a particular file is not provided, that value will not be saved.

Returns:

A resultor object

Return type:

yann.modules.resultor

Todo

Remove the input file names, assume file names as default.

print_confusion(epoch=0, train=None, valid=None, test=None, verbose=2)[source]

This method will print the confusion matrix down in files.

Parameters:
  • epoch – This is used merely to create a directory for each epoch so that there is a copy.
  • train – training confusion matrix as gained by the validate method.
  • valid – validation confusion amtrix as gained by the validate method.
  • test – testing confusion matrix as gained by the test method.
  • verbose – As usual.
process_results(cost, lr, mom, params=None, verbose=2)[source]

This method will print results and also write them down in the appropriate files.

Parameters:
  • cost – Cost, is a float
  • lr – Learning Rate, is a float
  • mom – Momentum, is a float.
update_plot(verbose=2)[source]

Todo

This method should update the open plots with costs and other values. Ideally, a browser based system should be implemented, such as using mpl3d or using bokeh. This system should open opne browser where it should update realtime the cost of training, validation and testing accuracies per epoch, display the visualizations of filters, some indication of the weight of gradient trained, confusion matrices, learning rate and momentum plots etc.