Module Expr Str Import alias ImportFrom alias Import alias identifier Import alias ImportFrom alias alias Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareNotEq Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad SubscriptLoad Str Index BoolOpOr AttributeLoad NameLoad attr Num Assign NameStore BinOpDiv BinOpMult Num Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Print NameLoad BinOpMod Str NameLoad decorator_list If AttributeLoad NameLoad attr body With Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameStore body Expr Call NameLoad NameLoad orelse Expr Call NameLoad AttributeLoad NameLoad attr
N/A N/A 
Compute the overall accuracy of a confusion matrix
 N/A sys optparse OptionParser N/A numpy np N/A cpa.util cpa.profiling.confusion confusion_matrix load_confusion N/A parser N/A OptionParser usage: %prog [options] CONFUSION N/A N/A N/A parser add_option -f dest float action store_true help use floating-point accuracies N/A N/A N/A parser add_option -o dest output_filename help file to store the profiles in N/A N/A options args N/A N/A parser parse_args N/A N/A N/A len args 1 N/A N/A N/A N/A parser error Incorrect number of arguments N/A N/A input_filename args N/A confusion N/A load_confusion input_filename N/A cm N/A confusion_matrix confusion N/A if N/A N/A N/A options float 0 N/A acc N/A N/A 100.0 N/A N/A N/A N/A np diag cm sum N/A N/A cm sum write_output N/A N/A f N/A N/A N/A f N/A %.0f%% acc N/A N/A N/A options output_filename N/A N/A N/A N/A N/A cpa util replace_atomically N/A options output_filename f N/A N/A N/A write_output f N/A N/A N/A write_output N/A sys stdout