# sorted_rocs = sorted(rocs, key=lambda x: x[1]) # for tuple in sorted_rocs: # print tuple plt.hist(rocs) plt.title("Target AUC distribution") plt.xlabel("AUC") plt.ylabel("Frequency") plt.show() parser = argparse.ArgumentParser() parser.add_argument("filename", help="input file of scoredata") file = parser.parse_args().filename print file data = pd.create_dict(file) #TODO - take input file as commandline arg and update titles accordingly based on that #data = pd.create_dict('SCOREDATA.vina.balanced') #data = pd.create_dict('SCOREDATA.vina.reduced') #data = pd.create_dict('SCOREDATA.dkoes.reduced') #linreg_ccv_plot_roc(10) #precision_recall_curve(10) #rfc_test_on_train() #bootstrap(10, 100) #leave_target_out() #ccv_plot_roc(10) #logreg_precision_recall_ccv(10)
from joblib import delayed, Parallel from scipy import interp from sklearn.metrics import auc, roc_curve from sklearn.linear_model import LinearRegression __author__ = "Jesus Bracho" __date__ = "01.29.2016" # TODO: Old script. Refactor. parser = argparse.ArgumentParser() parser.add_argument("filename", help="input file of scoredata") datafile = parser.parse_args().filename data = pd.create_dict(datafile) data.pop("fpps", None) clf = LinearRegression(normalize=True) # Initialize mean true positive and false positive rates. mean_tpr = 0.0 mean_fpr = np.linspace(0, 1, 100) all_tpr = [] # Retrievs a list of targets based on the data's key values. targets = data.keys() target_size = len(targets) target_range = range(len(targets)) # Added to try and fix legend