Contingency Space

Home How To Metrics About

Upload Models in Batches

Comparison of Multiple Models

model_comparison_example.json

To compare the performance of multiple models using the Contingency Space, you can use this example template (in .txt or .json format). This file contains a list of dictionaries each of which representing a confusion matrix. Each confusion matrix can also be given a name so that they can be distinguished from other models' confusion matrices, in the plots.

Comparison of Multiple Learning Path

learning_path_example.json

To compare the learning path of multiple models using the Contingency Space, you can use this example template (in .txt or .json format). This file contains a list of dictionaries each of which representing a learning path. A learning path can be given a name so that it can be distinguished from other learning paths in the plot. The elements of each learning path are confusion matrices representing the model's performance at a certain epoch.

Upload a Customized Metric

customized_metric_example.txt

To visualize your customized metric you may upload a .txt or .py file containing a Python script describing your metric. An example of such a script (for accuracy) is shown below. Note that the four entries of a confusion matrix are given using 'cm.tp', 'cm.fp' ,'cm.tn', and 'cm.fn', where 'cm' is a reference to a class instance representing the confusion matrix.

result = (cm.tp + cm.tn) / (cm.p + cm.n) if cm.p + cm.n > 0 else 0

Note that the following rules must be held:

1) there may not be more than 200 characters used in the corresponding file,
2) there may not be any loops included in the file, such as "while" or "for" loops,
3) the single-value performance score must be stored in a variable named 'result'. This variable may be obtained using the four values of a confusion matrix, namely 'cm.tp', 'cm.fp', 'cm.tn', and 'cm.fn'.