<s> import json <EOL> from sklearn . metrics import roc_curve <EOL> import numpy as np <EOL> import matplotlib . pyplot as plt <EOL> def main ( ) : <EOL> labels = json . load ( open ( '<STR_LIT>' ) ) <EOL> on = labels [ '<STR_LIT>' ] <EOL> off = labels [ '<STR_LIT>' ] <EOL> yp = np . array ( on + off ) <EOL> y = np . array ( [ <NUM_LIT:1> ] * len ( on ) + [ <NUM_LIT:0> ] * len ( off ) ) <EOL> pars = np . array ( labels [ '<STR_LIT>' ] + labels [ '<STR_LIT>' ] ) <EOL> for i in [ <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:2> ] : <EOL> mask = pars [ : , <NUM_LIT:0> ] % <NUM_LIT:3> == i <EOL> fp , tp , _ = roc_curve ( y [ mask ] , yp [ mask ] ) <EOL> plt . plot ( fp , tp , label = '<STR_LIT>' % ( i + <NUM_LIT:1> ) ) <EOL> plt . xlim ( <NUM_LIT:0> , <NUM_LIT> ) <EOL> plt . xlabel ( "<STR_LIT>" ) <EOL> plt . ylabel ( "<STR_LIT>" ) <EOL> plt . legend ( loc = '<STR_LIT>' , frameon = False ) <EOL> plt . gcf ( ) . set_tight_layout ( True ) <EOL> ax = plt . gca ( ) <EOL> ax . set_xticks ( [ <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> ] ) <EOL> plt . savefig ( '<STR_LIT>' ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> main ( ) </s>
