continue from 140929-target-combine
In [1]:
%matplotlib inline
from matplotlib import pylab as pl
import cPickle as pickle
import pandas as pd
import numpy as np
import os
import re
import math
import sys
import random
In [148]:
w_gb = 0.471
In [149]:
df = pd.DataFrame()
df['gb'] = pd.read_csv('../submissions/140929-target-combine.validate.1.csv', index_col='clip', squeeze=True)
df['rf'] = pd.read_csv('../submissions/140929-target-combine.validate.2.csv', index_col='clip', squeeze=True)
df['y_est'] = w_gb * df['gb'] + (1.-w_gb)*df['rf']
df['y'] = [int(s.find('preictal') >= 0) for s in df.index.values]
In [150]:
df.mean()
Out[150]:
In [151]:
from sklearn.metrics import roc_auc_score
roc_auc_score(df.y, df.y_est)
Out[151]:
the factor as used in 140926-mix-submissions
In [152]:
w_gb/(1.-w_gb)
Out[152]:
In [ ]: