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]:
gb       0.041223
rf       0.137927
y_est    0.092379
y        0.074010
dtype: float64

In [151]:
from sklearn.metrics import roc_auc_score
roc_auc_score(df.y, df.y_est)


Out[151]:
0.86366122484269181

the factor as used in 140926-mix-submissions


In [152]:
w_gb/(1.-w_gb)


Out[152]:
0.8903591682419659

In [ ]: