In [2]:
%matplotlib inline
from matplotlib import pylab as pl
import cPickle as pickle
import pandas as pd
import numpy as np
import os

In [3]:
df = pd.DataFrame()
df['gb'] = pd.read_csv('../submissions/140928-predict.1.csv', index_col='clip', squeeze=True) #64
df['rf'] = pd.read_csv('../submissions/140926-predict.2.csv', index_col='clip', squeeze=True)

In [4]:
pd.scatter_matrix(df[['gb','rf']],figsize=(6, 6), diagonal='kde');


constant from 140929-test-validate


In [5]:
w_gb  = 0.89
w_rf = 1

s = w_gb + w_rf

w_gb /= s
w_rf /= s

In [6]:
w_gb, w_rf


Out[6]:
(0.4708994708994709, 0.5291005291005291)

In [7]:
df['preictal'] = w_gb * df['gb'] + w_rf * df['rf']

In [8]:
df['preictal'].to_csv('../submissions/140929-predict.3.csv', header=True)

In [9]:
!head ../submissions/140929-predict.3.csv


clip,preictal
Dog_1_test_segment_0001.mat,0.3101525965937809
Dog_1_test_segment_0002.mat,0.06842166383064048
Dog_1_test_segment_0003.mat,0.09718808109984112
Dog_1_test_segment_0004.mat,0.13715595130374966
Dog_1_test_segment_0005.mat,0.10523319205978315
Dog_1_test_segment_0006.mat,0.10488373427180674
Dog_1_test_segment_0007.mat,0.042254071469135825
Dog_1_test_segment_0008.mat,0.1445272727475574
Dog_1_test_segment_0009.mat,0.05649311659060416

In [10]:
df['best'] = pd.read_csv('../submissions/140928-predict.2.csv', index_col='clip', squeeze=True)

In [11]:
pd.scatter_matrix(df[['best','preictal']])


Out[11]:
array([[<matplotlib.axes.AxesSubplot object at 0x105e1cb50>,
        <matplotlib.axes.AxesSubplot object at 0x105ecf1d0>],
       [<matplotlib.axes.AxesSubplot object at 0x116442150>,
        <matplotlib.axes.AxesSubplot object at 0x116dc3050>]], dtype=object)

In [ ]: