In [35]:
import json
import pandas as pd
from datetime import datetime
import numpy as np
import math
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import plotly.graph_objs as go
from plotly import tools
import plotly.plotly as py
import cufflinks as cf
cf.go_online()

inpExifFl = "../data/GZC_exifs_beauty_full.json"

with open(inpExifFl,"r") as inpJsonFl:
    exifJsonObj = json.load(inpJsonFl)


Explaratory data analysis

Summary stasitics and distributions


In [36]:
exifDf = pd.DataFrame(exifJsonObj).transpose()

exifDf['datetime'] = exifDf['datetime'].apply(lambda x : datetime.strptime(x,'%Y-%m-%d %H:%M:%S'))
exifDf['day'] = exifDf.datetime.apply(lambda x : x.day)
exifDf['hour'] = exifDf.datetime.apply(lambda x : x.hour)
exifDf.drop(['size','datetime'],1,inplace=True)
exifDf.head()


Out[36]:
arousal contrast dominance height hsv_itten_std_h hsv_itten_std_s hsv_itten_std_v lat long orientation pleasure symmetry width day hour
1 0.0411613 2.44883 0.42617 4000 145133 184810 225483 -1.3514 36.8002 1 0.366162 6.15084 6000 1 14
10 -0.0677241 1.4738 0.500873 4000 105719 140171 133193 -1.36709 36.782 1 0.441554 11.4251 6000 1 15
100 0.0107685 2.27182 0.445344 4000 102122 139804 189860 -1.37325 36.8003 1 0.385749 8.83975 6000 1 16
1000 0.0267916 2.2988 0.446958 3072 100419 106270 146868 -1.34968 36.806 1 0.385603 10.8675 4608 1 17
1001 0.0131469 2.27636 0.445515 3072 107165 112807 144619 -1.34968 36.806 1 0.385667 10.9425 4608 1 17

In [ ]:
trace1 = go.Histogram(
        x=exifDf['height']
    )

trace2 = go.Histogram(
        x=exifDf['width']
    )

trace3 = go.Histogram(
        x=exifDf['lat']
    )

trace4 = go.Histogram(
        x=exifDf['long']
    )

trace5 = go.Histogram(
        x=exifDf['orientation']
    )

trace6 = go.Histogram(
        x=exifDf['day']
    )

trace7 = go.Histogram(
        x=exifDf['hour']
    )

trace8 = go.Histogram(
        x=exifDf['pleasure']
    )

trace9 = go.Histogram(
        x=exifDf['arousal']
    )

trace10 = go.Histogram(
        x=exifDf['dominance']
    )

trace11 = go.Histogram(
        x=exifDf['contrast']
    )

trace12 = go.Histogram(
        x=exifDf['hsv_itten_std_h']
    )

trace13 = go.Histogram(
        x=exifDf['hsv_itten_std_s']
    )

trace14 = go.Histogram(
        x=exifDf['hsv_itten_std_v']
    )

trace15 = go.Histogram(
        x=exifDf['symmetry']
    )


fig = tools.make_subplots(rows=8, cols=2, subplot_titles=('height','width','lat','long','orientation','day','hour','pleasure','arousal','dominance','contrast','hsv_itten_std_h','hsv_itten_std_s','hsv_itten_std_v','symmetry'))

fig.append_trace(trace1, 1, 1)
fig.append_trace(trace2, 1, 2)
fig.append_trace(trace3, 2, 1)
fig.append_trace(trace4, 2, 2)
fig.append_trace(trace5, 3, 1)
fig.append_trace(trace6, 3, 2)
fig.append_trace(trace7, 4, 1)
fig.append_trace(trace8, 4, 2)
fig.append_trace(trace9, 5, 1)
fig.append_trace(trace10, 5, 2)
fig.append_trace(trace11, 6, 1)
fig.append_trace(trace12, 6, 2)
fig.append_trace(trace13, 7, 1)
fig.append_trace(trace14, 7, 2)
fig.append_trace(trace15, 8, 1)


fig['layout'].update(showlegend=False, height=1000, width=1000, title='Data distributions')
plot(fig, filename='../FinalResults/Distributions_BeautyFeatures_GZC.html')

Combining result data


In [ ]:
from numpy import arange,array,ones
from scipy import stats

In [37]:
resultsDf = pd.DataFrame.from_csv("../FinalResults/resultsExpt2RankList_Tags.csv")

resultsDf = pd.DataFrame(resultsDf['Proportion'])
resultsDict = resultsDf.to_dict(orient="index")

expt2Results = {}

for gid in resultsDict:
    expt2Results[str(gid)] = exifJsonObj[str(gid)]
    expt2Results[str(gid)].update(resultsDict[gid])

In [38]:
expt2ResultsDf = pd.DataFrame(expt2Results).transpose()

expt2ResultsDf['datetime'] = expt2ResultsDf['datetime'].apply(lambda x : datetime.strptime(x,'%Y-%m-%d %H:%M:%S'))
expt2ResultsDf['day'] = expt2ResultsDf.datetime.apply(lambda x : x.day)
expt2ResultsDf['hour'] = expt2ResultsDf.datetime.apply(lambda x : x.hour)
expt2ResultsDf.drop(['size','datetime'],1,inplace=True)
expt2ResultsDf.head()


Out[38]:
Proportion arousal contrast dominance height hsv_itten_std_h hsv_itten_std_s hsv_itten_std_v lat long orientation pleasure symmetry width day hour
10 20 -0.0677241 1.4738 0.500873 4000 105719 140171 133193 -1.36709 36.782 1 0.441554 11.4251 6000 1 15
1000 90 0.0267916 2.2988 0.446958 3072 100419 106270 146868 -1.34968 36.806 1 0.385603 10.8675 4608 1 17
1003 20 0.00380291 1.61078 0.534058 3072 116605 145911 182645 -1.34965 36.8062 1 0.463471 9.66617 4608 1 17
1005 80 -0.049412 1.75693 0.55702 3072 102427 140823 132426 -1.34965 36.8062 1 0.488551 12.6299 4608 1 17
101 20 0.0550115 2.42374 0.444083 4000 142995 193383 250416 -1.37325 36.8003 1 0.380382 6.21572 6000 1 16

In [ ]:
def linearRegressPlot(resultDf,xFtr,yStr):
    xi = np.array(resultDf[xFtr])
    y = list(resultDf[yStr])
    slope, intercept, r_value, p_value, std_err = stats.linregress(xi,y)
    line = slope*xi+intercept
    layout= go.Layout(
            title= "Linear line fit for regression using %s" %xFtr,
            showlegend=False,
            xaxis= dict(
                title= xFtr,
                ticklen= 5,
                zeroline= True,
                gridwidth= 2
            ),
            yaxis=dict(
                title= yStr,
                ticklen= 5,
                gridwidth= 2,
                #range=range
            )
        )

    trace1 = go.Scatter(
                x = xi,
                y = y,
                mode = 'markers'
        )

    trace2 = go.Scatter(
                x=xi, 
                y=line, 
                mode='lines',
                name='Fit'
                      )

    data = [trace1,trace2]

    fig = dict(data=data,layout=layout)
    figMain = py.iplot(fig,filename= str("linear_fit_%s" %xFtr))
    print("r_value, p_value" ,(r_value,p_value))
    print(figMain.embed_code)

linearRegressPlot(expt2ResultsDf,'symmetry','Proportion')

In [ ]:
xi = np.array(expt2ResultsDf['height'])
y = list(expt2ResultsDf['Proportion'])
slope, intercept, r_value, p_value, std_err = stats.linregress(xi,y)
slope, intercept, r_value, p_value, std_err

In [ ]:
exifDf.max()

In [ ]:


In [ ]:
import importlib

import ExtractBtyFtrs as EBty
importlib.reload(EBty)

In [ ]:
EBty.createFtrFile("../FinalResults/resultsExpt2RankList_Tags.csv","../data/GZC_exifs_beauty_full.json","../data/BeautyFtrVector_GZC.csv")

In [ ]:
resultsDf = pd.DataFrame.from_csv("../FinalResults/resultsExpt2RankList_Tags.csv")
resultsDf.head()

In [ ]:

Classifier Training


In [67]:
from sklearn.model_selection import train_test_split
import ClassiferHelperAPI as CH
import RegressionCapsuleClass as RgrCls
import pandas as pd
import importlib
importlib.reload(RgrCls)

from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import plotly.graph_objs as go
import cufflinks as cf
cf.go_offline()



In [2]:
inpData = pd.DataFrame.from_csv("../data/BeautyFtrVector_GZC.csv")
inpData.head()


Out[2]:
Proportion arousal contrast dominance height hsv_itten_std_h hsv_itten_std_s hsv_itten_std_v lat long orientation pleasure symmetry width day hour
10 20.0 -0.067724 1.473800 0.500873 4000 105718.831503 140170.630774 133192.928522 -1.367088 36.781978 1 0.441554 11.425084 6000 1 15
1000 90.0 0.026792 2.298800 0.446958 3072 100418.690900 106270.090353 146867.861046 -1.349683 36.806025 1 0.385603 10.867455 4608 1 17
1003 20.0 0.003803 1.610780 0.534058 3072 116605.125589 145911.415673 182644.571576 -1.349651 36.806162 1 0.463471 9.666165 4608 1 17
1005 80.0 -0.049412 1.756933 0.557020 3072 102427.151569 140822.729057 132426.326397 -1.349651 36.806162 1 0.488551 12.629949 4608 1 17
101 20.0 0.055012 2.423743 0.444083 4000 142994.891693 193382.957863 250415.909007 -1.373255 36.800266 1 0.380382 6.215719 6000 1 16

In [ ]:
inpData = inpData[(inpData['Proportion'] >= 80.0) | (inpData['Proportion'] <= 20.0)]
inpData['TARGET'] = np.where(inpData['Proportion'] >= 80.0, 1, 0)
inpData.drop(['Proportion'],1,inplace=True)

In [3]:
y = inpData['Proportion']
inpData.drop(['Proportion'],1,inplace=True)

In [1]:


In [17]:
train_x, test_x, train_y, test_y = CH.train_test_split(inpData, y, test_size = 0.2)
rgr = CH.getLearningAlgo('elastic_net',{'fit_intercept':True})
    
rgrObj = RgrCls.RegressionCapsule(rgr,'elastic_net',0.8,train_x,train_y,test_x,test_y)

In [18]:
rgrObj.runRgr(removeOutliers=False)

In [19]:
rgrObj.abserr, rgrObj.sqerr


Out[19]:
(23.611381944920133, 796.88386165148518)

In [20]:
x_data = rgrObj.preds
y_data = rgrObj.residues

In [24]:
# Create a trace
trace = go.Scatter(
    x = x_data,
    y = y_data,
    mode = 'markers'
)

data = [trace]

# Plot and embed in ipython notebook!
a = py.iplot(data, filename='basic-scatter')

In [26]:
a.embed_code


Out[26]:
'<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~kamblenoopur/103.embed" height="525px" width="100%"></iframe>'

In [ ]:
rgrObj.fit(train_x, train_y)

In [ ]:
from sklearn.metrics import mean_absolute_error, mean_squared_error

In [ ]:
mean_squared_error(test_y, preds), mean_absolute_error(test_y, preds)

In [ ]:
mean_squared_error(test_y, preds), mean_absolute_error(test_y, preds)

In [7]:
inpData.head()


Out[7]:
arousal contrast dominance height hsv_itten_std_h hsv_itten_std_s hsv_itten_std_v lat long orientation pleasure symmetry width day hour
10 -0.067724 1.473800 0.500873 4000 105718.831503 140170.630774 133192.928522 -1.367088 36.781978 1 0.441554 11.425084 6000 1 15
1000 0.026792 2.298800 0.446958 3072 100418.690900 106270.090353 146867.861046 -1.349683 36.806025 1 0.385603 10.867455 4608 1 17
1003 0.003803 1.610780 0.534058 3072 116605.125589 145911.415673 182644.571576 -1.349651 36.806162 1 0.463471 9.666165 4608 1 17
1005 -0.049412 1.756933 0.557020 3072 102427.151569 140822.729057 132426.326397 -1.349651 36.806162 1 0.488551 12.629949 4608 1 17
101 0.055012 2.423743 0.444083 4000 142994.891693 193382.957863 250415.909007 -1.373255 36.800266 1 0.380382 6.215719 6000 1 16

In [1]:
import json
import pandas as pd
from datetime import datetime

In [12]:
with open("../data/GZC_exifs_beauty_full.json") as jsonObj:
    jsonDict = json.load(jsonObj)
df = pd.DataFrame.from_dict(jsonDict).transpose()
df['datetime'] = df['datetime'].apply(lambda x : datetime.strptime(x,'%Y-%m-%d %H:%M:%S'))
df['day'] = df.datetime.apply(lambda x : x.day)
df['hour'] = df.datetime.apply(lambda x : x.hour)
df.drop(['size','datetime'],1,inplace=True)
# df.head()
df.to_csv("../data/GZC_exifs_beauty_full.csv")

In [5]:
len(df)


Out[5]:
9406

In [161]:
import PopulationEstimatorFromClf as PE
import importlib
importlib.reload(PE)

regrArgs = {'linear' : {'fit_intercept' : True},
            'ridge' : {'fit_intercept' : True},
            'lasso' : {'fit_intercept' : True},
            'svr' : {'fit_intercept' : True},
            'dtree_regressor' : {'fit_intercept' : True}}

methArgs = {'dummy' : {'strategy' : 'most_frequent'},
            'bayesian' : {'fit_prior' : True},
            'logistic' : {'penalty' : 'l2'},
            'svm' : {'kernel' : 'rbf','probability' : True},
            'dtree' : {'criterion' : 'entropy'},
            'random_forests' : {'n_estimators' : 10 },
            'ada_boost' : {'n_estimators' : 50 }}

inExifFl,inGidAidMapFl,inAidFtrFl = "../data/imgs_exif_data_full.json","../data/full_gid_aid_map.json","../data/full_aid_features.json"

In [126]:
# obj = PE.trainLearningObj("../data/BeautyFtrVector_GZC_Expt2.csv",
#                          "../data/GZC_exifs_beauty_full.csv",
#                          'logistic',
#                          'beauty',
#                           None,
#                           methArgs,
#                           True
#                          )

# obj, res = PE.trainTestRgrs("../FinalResults/ImgShrRnkListWithTags.csv",
#                          "../data/full_gid_aid_ftr_agg.csv",
#                          'linear',
#                          'non_sparse',
#                           None,
#                           regrArgs
#                          )
obj, res = PE.trainTestRgrs("../data/BeautyFtrVector_GZC_Expt2.csv",
                         "../data/GZC_exifs_beauty_full.csv",
                         'linear',
                         'beauty',
                          None,
                          regrArgs
                         )


Number of outliers identified: 1
9405 9405

In [124]:
a, results = PE.trainTestClf("../data/BeautyFtrVector_GZC_Expt2.csv",
                         "../data/GZC_exifs_beauty_full.csv",
                             'logistic',
                             'beauty',
                              None,
                              methArgs
                            )

In [125]:
res


Out[125]:
{'8287': 49.216683559356369,
 '8259': 51.854799518005493,
 '806': 40.976623978089968,
 '2029': 49.619708806657179,
 '2089': 46.91469371258566,
 '8764': 53.074001804819886,
 '4206': 44.781509699096588,
 '3950': 46.439990824972845,
 '7793': 48.08013391376808,
 '1205': 55.807458747326031,
 '1575': 56.469391803409394,
 '2362': 53.549256487678107,
 '3621': 54.431403786405959,
 '5142': 64.005551625247108,
 '8047': 46.918979677014065,
 '1311': 56.47662729294936,
 '7425': 45.055601212925907,
 '6991': 50.176266220033874,
 '265': 53.703759804079851,
 '7655': 41.568261282006048,
 '1865': 49.081933678705269,
 '2407': 62.310867355902523,
 '7022': 54.519277289121412,
 '1239': 49.293419965751269,
 '8955': 51.701047107778535,
 '2380': 55.031108928605136,
 '3563': 43.178152964248142,
 '8027': 47.497593612958433,
 '2850': 51.847676735639205,
 '4329': 40.79933072318066,
 '276': 58.998472733061071,
 '8455': 46.22894308655011,
 '1075': 51.401982340634994,
 '4811': 42.097632620371613,
 '8783': 47.513556972753207,
 '3450': 60.045920481732907,
 '1941': 51.99874905592808,
 '987': 26.501078139184106,
 '732': 45.43411124969878,
 '6672': 34.109162979233702,
 '8688': 48.55274663928742,
 '9234': 52.747798050868298,
 '1765': 50.026341509826047,
 '7407': 52.790771995265999,
 '4509': 40.843438889356527,
 '6898': 59.965155708843604,
 '1900': 51.479709649809976,
 '6576': 50.756857072902193,
 '3990': 62.316809655570488,
 '104': 48.018014364603232,
 '5598': 54.629779228309367,
 '1003': 46.082826733520903,
 '4637': 47.546254776110715,
 '113': 58.704071909474536,
 '7269': 42.902331247326281,
 '6218': 38.919911980297016,
 '5222': 51.567459255156351,
 '5190': 53.487921612102753,
 '1666': 56.897039030501858,
 '8705': 49.360685893765037,
 '8333': 53.088128926331592,
 '4798': 40.806353447294462,
 '2519': 71.137023238937957,
 '282': 52.95088105001858,
 '5466': 50.292724845006546,
 '2456': 52.794642586256288,
 '5722': 52.527840693393983,
 '2995': 54.748858531909264,
 '9361': 56.548408669550028,
 '79': 47.899982877724838,
 '7257': 50.508477768410245,
 '6572': 42.218024396704877,
 '1754': 53.796699948922381,
 '3444': 54.650575570917596,
 '8153': 42.518890402856734,
 '407': 49.308739431857845,
 '1248': 52.466220119594482,
 '1612': 48.649841553767445,
 '1053': 45.333368958834626,
 '1280': 62.26422751723036,
 '7598': 39.365802805844268,
 '130': 61.75058431847846,
 '6084': 59.994626402116744,
 '8496': 50.262311207108439,
 '3127': 50.759608493454834,
 '1516': 57.142013677641344,
 '855': 36.734869592047197,
 '5390': 53.329593478110397,
 '7357': 48.00327231075245,
 '5251': 46.206800044694702,
 '2531': 66.729519739513421,
 '2712': 51.817760340950429,
 '2328': 65.122114271577061,
 '5355': 48.621965456772514,
 '7146': 49.812783210057191,
 '2360': 71.786996543033766,
 '5269': 53.02901264424743,
 '3112': 50.07945487934019,
 '3126': 52.67602979331906,
 '8382': 54.819421174121807,
 '2294': 51.063277391241655,
 '8277': 52.607648919785078,
 '5290': 46.732192785256153,
 '3233': 54.432098592801346,
 '4702': 40.913426243267466,
 '7470': 62.667848372776689,
 '4649': 48.482534389283245,
 '9304': 52.597021837025459,
 '786': 42.497079958127799,
 '1102': 53.745381254194101,
 '527': 39.348063998527557,
 '1812': 48.207277524532934,
 '6564': 45.272240367927637,
 '8156': 43.681406568695252,
 '5913': 37.296283122768322,
 '1396': 51.501640636947485,
 '5172': 53.766088374400624,
 '8182': 48.320173793760233,
 '2849': 52.838517249337023,
 '1839': 47.258180852176466,
 '2957': 44.880409886993036,
 '2633': 57.217630993520167,
 '8173': 48.987672128504713,
 '1539': 54.678977436428639,
 '4949': 54.294270563146419,
 '764': 41.064316418501981,
 '5759': 55.548456764436239,
 '3601': 54.017987407457674,
 '5535': 46.459412565365412,
 '6387': 49.012467520092798,
 '4776': 49.647779728507516,
 '2787': 51.617863656776599,
 '83': 51.002313400839292,
 '7186': 46.738289205656429,
 '8529': 58.565869201881242,
 '5475': 48.36475961239546,
 '59': 55.490958747685582,
 '3419': 62.370664192061753,
 '4532': 46.669264262276855,
 '5866': 43.638582745507193,
 '6022': 58.142514205186899,
 '7016': 61.52630828964579,
 '8020': 47.035053043291306,
 '3981': 51.851972367692483,
 '8115': 45.518785332002466,
 '797': 42.841333238183928,
 '3316': 53.756559116533474,
 '1066': 50.082465996299675,
 '5279': 56.479507923135309,
 '5047': 55.504833558455275,
 '9018': 51.245887154123665,
 '1813': 47.88212991407449,
 '5521': 49.802522338261291,
 '5069': 51.530696269945238,
 '1932': 46.828272511207459,
 '8835': 56.225006247586123,
 '8972': 53.710951486979461,
 '7573': 43.473340576438375,
 '486': 39.926664803433916,
 '353': 58.457264212072964,
 '8218': 52.504954632951268,
 '2816': 51.964248980537597,
 '8085': 44.376467297044222,
 '5628': 51.726942009325676,
 '7950': 47.374379149034183,
 '1573': 55.351190688895016,
 '5070': 48.540638274075128,
 '6031': 41.118937730945383,
 '4498': 53.815182752984825,
 '3309': 53.938100380293946,
 '5807': 59.687604010112878,
 '2521': 69.079147688362468,
 '3169': 49.485002576285638,
 '4900': 50.95674991423509,
 '5024': 51.003190113407399,
 '7885': 47.357202597201841,
 '8084': 42.839728708729901,
 '1662': 55.465340237025018,
 '7333': 51.119702759526028,
 '2175': 61.967757895531449,
 '308': 58.102214078720344,
 '722': 42.306572608388713,
 '3397': 50.062954091818781,
 '6871': 55.343697096218385,
 '6095': 50.030874775184671,
 '3429': 61.251954267915288,
 '9110': 49.267911270585444,
 '9406': 58.212561007583588,
 '4952': 47.976940117842815,
 '2750': 54.017017182205358,
 '4069': 31.349507664509972,
 '7807': 49.729141703355801,
 '5942': 46.45582913776871,
 '637': 41.901510113492584,
 '8423': 50.576891426583416,
 '136': 58.989416157734198,
 '7654': 39.337084183408379,
 '2047': 45.843527729700149,
 '2907': 42.666850697650489,
 '4314': 39.760046039863219,
 '9189': 51.603478092373422,
 '1966': 48.684227300164999,
 '5577': 56.495788526284144,
 '1963': 49.004492445151833,
 '6698': 44.180604615055948,
 '7160': 55.477810015958475,
 '6006': 46.992796099975266,
 '5894': 42.782293884331402,
 '6018': 46.145075629543889,
 '1106': 40.905092520886292,
 '9384': 45.398246340185992,
 '1375': 53.371716429771624,
 '8632': 51.352278343105411,
 '5122': 55.709962824224988,
 '1952': 50.836728746018665,
 '3431': 51.763250165427863,
 '7579': 42.779341395248345,
 '1875': 47.716097233305732,
 '6044': 46.643410126168085,
 '7537': 46.956042812752209,
 '7669': 40.825261080885312,
 '6684': 54.156820660145577,
 '880': 47.811224509008582,
 '9038': 54.405104763820397,
 '6613': 48.985026437235497,
 '4110': 56.479595196069759,
 '7939': 48.118595869992596,
 '4242': 46.198146704985341,
 '6357': 48.112482029002081,
 '8821': 49.05783824432325,
 '6047': 44.253421732888903,
 '423': 40.231525170868579,
 '1556': 50.706966361962436,
 '3409': 54.213315950973872,
 '6858': 58.374221743703004,
 '6153': 50.622205265243835,
 '6860': 55.32273400106169,
 '6872': 57.277742022189912,
 '6678': 44.933308055976106,
 '6135': 49.64417324525806,
 '2611': 48.338751818002208,
 '8693': 48.301008672506853,
 '3203': 49.471819422329062,
 '1863': 47.352946659604854,
 '611': 38.56896162659482,
 '5720': 60.768495997534643,
 '2747': 47.710041027776597,
 '4812': 43.430557967696295,
 '2680': 49.001187073083941,
 '8755': 49.952470226113149,
 '9117': 49.95330000190318,
 '1529': 52.891076425442208,
 '8485': 53.415706118471405,
 '5828': 59.298285595012317,
 '1293': 55.20984474549924,
 '6558': 48.63060095102162,
 '7104': 49.62330339371303,
 '7985': 40.296420934834742,
 '5923': 34.282236636011021,
 '8273': 50.604746559613865,
 '7439': 50.08828852765744,
 '6922': 52.603753075565791,
 '8424': 50.329586990920049,
 '1500': 62.440222192412733,
 '2987': 57.023284761928494,
 '7388': 45.86308587665426,
 '7724': 50.953996261271541,
 '8752': 43.384123640356229,
 '3280': 53.943062951446791,
 '7769': 55.23491374198187,
 '1324': 54.847531105785869,
 '9064': 47.521689232029971,
 '1094': 54.003803349175548,
 '5498': 50.005409835232228,
 '9341': 48.032817530537784,
 '761': 43.544874200807236,
 '5236': 52.658707873081468,
 '319': 39.624746359415433,
 '3532': 39.510520902915651,
 '3264': 49.9649955930754,
 '7351': 61.18500310096762,
 '6809': 46.073263949860753,
 '9377': 48.375390976562102,
 '7843': 50.615343907885162,
 '6785': 67.185317460332129,
 '2256': 48.101646848833312,
 '1634': 51.170478770424339,
 '4569': 47.218394868798576,
 '9197': 45.288439668459276,
 '7069': 55.433102454053589,
 '6704': 61.197758094392483,
 '9366': 41.398859467078331,
 '2716': 46.213494337699373,
 '6911': 56.511775220316416,
 '4597': 51.715998910199247,
 '2074': 40.68744997084675,
 '7288': 46.021420544544377,
 '1457': 50.73375825368349,
 '5725': 62.708062745152247,
 '7404': 40.732915011378289,
 '7010': 52.650194045267241,
 '2636': 47.166535472488356,
 '2377': 53.660269909480661,
 '9364': 50.526086164329257,
 '2431': 56.458335760400274,
 '6406': 47.155799237487543,
 '3676': 59.295031699570387,
 '5754': 60.33346217307782,
 '4738': 52.783872524394212,
 '2015': 47.480772854316079,
 '3731': 52.871265420781405,
 '6526': 42.134157356539966,
 '3068': 66.28896319559091,
 '6025': 50.350737223181497,
 '8434': 51.321610716814341,
 '1772': 48.025907668964791,
 '365': 50.397732833159566,
 '5950': 39.377576809203077,
 '4679': 46.462717975174449,
 '7789': 50.321321158621565,
 '4196': 44.408116862033665,
 '6015': 43.432856600112281,
 '3598': 53.025282999385084,
 '525': 54.637988628677199,
 '6160': 47.487279638056108,
 '9247': 49.833314454739266,
 '3398': 52.363565568915774,
 '4694': 63.880614505492019,
 '369': 55.503908941976782,
 '1740': 49.022181884885867,
 '7108': 51.747205663226239,
 '7784': 45.774342597609248,
 '4641': 46.799422522826021,
 '998': 41.452372341927735,
 '7788': 46.454352342050548,
 '9255': 50.741787587577079,
 '1227': 41.95440913848978,
 '6391': 46.865672053282736,
 '3960': 47.652043353230709,
 '7475': 55.872183959745598,
 '5961': 39.839805688328042,
 '6434': 64.505212242013243,
 '1262': 50.16506136743174,
 '1661': 53.510067805453602,
 '2120': 66.759463042755115,
 '7542': 47.69385938621695,
 '8512': 52.079866751777239,
 '7117': 45.517637763468016,
 '943': 37.1886559546911,
 '2033': 45.587013742590479,
 '4028': 45.563430841868019,
 '3109': 53.709980314927378,
 '7481': 61.998007428706401,
 '2862': 52.410411367732188,
 '8457': 52.279597609545647,
 '2572': 52.569607121951442,
 '1498': 59.680317142835463,
 '4423': 56.052938427400186,
 '3643': 50.283945996584222,
 '2983': 59.074148758326189,
 '3665': 52.402254446428152,
 '9017': 46.090889866927419,
 '3364': 51.943179473478786,
 '8141': 46.662117171441402,
 '6887': 60.667358508610754,
 '6940': 58.054383989421289,
 '3462': 53.236338032044536,
 '4359': 28.092506517238238,
 '8918': 50.67592677541716,
 '8087': 47.678996214384895,
 '1246': 43.845475911848453,
 '9305': 53.203934193647179,
 '1050': 53.476772012723337,
 '2711': 47.547914044261425,
 '4622': 47.96469593455668,
 '4610': 53.304020825278798,
 '426': 49.495263218087288,
 '4918': 46.051673988293658,
 '4822': 46.39113368688124,
 '9154': 49.22396161149959,
 '8039': 44.441816669728773,
 '4659': 48.933199891270576,
 '3982': 56.011694941329665,
 '810': 40.717473004276194,
 '8036': 42.723374649391403,
 '6841': 60.780520948396877,
 '9357': 60.919971938902265,
 '443': 61.905093042545388,
 '7823': 44.009041367094653,
 '2963': 46.817089713889928,
 '3799': 59.710502143939564,
 '4073': 29.600781143284877,
 '6224': 48.106957475477536,
 '6679': 53.967442204041866,
 '4188': 48.622451452157122,
 '2166': 59.747306741765058,
 '5826': 56.521928895730284,
 '4652': 47.987917685911007,
 '3919': 54.123101204789847,
 '5712': 51.659269427493236,
 '2671': 47.102174109800835,
 '6244': 46.483314591794844,
 '1533': 59.856254708039586,
 '3701': 52.405504683087393,
 '135': 50.554256072425169,
 '3325': 71.554084433918348,
 '5994': 49.85744658294513,
 '1541': 54.479293906789991,
 '4492': 44.792285069162737,
 '4878': 40.800568259811733,
 '6626': 44.915678701073155,
 '5447': 50.014191895202671,
 '7020': 49.466991399273333,
 '3622': 55.716303749929047,
 '7167': 48.097352188923644,
 '1499': 62.324990884483256,
 '6053': 43.324463001179701,
 '6331': 48.668978701650488,
 '3168': 64.307038976070544,
 '1637': 55.156816021968709,
 '4644': 47.56030952390126,
 '2870': 55.774655675182572,
 '2688': 53.088844373817778,
 '424': 41.557515729859148,
 '9294': 41.493806735878529,
 '888': 58.014793668983685,
 '1345': 69.990676341222695,
 '8628': 51.716304645797024,
 '1618': 55.342722383012017,
 '7681': 43.200499585867561,
 '391': 49.90992505867402,
 '4592': 59.823986061066776,
 '8850': 45.713375765495684,
 '4273': 48.801855703534429,
 '6995': 59.691668097033038,
 '2326': 65.524049919485307,
 '971': 46.968705177321169,
 '3918': 47.672648128895602,
 '7055': 54.476597904577694,
 '4583': 49.365065681585975,
 '222': 50.425192637202549,
 '5036': 51.275838948130968,
 '2573': 57.939955125441003,
 '6390': 53.183220321003013,
 '1642': 57.31958067024614,
 '6068': 54.104113046541315,
 '8058': 46.252079860189497,
 '3966': 51.792954364614502,
 '5912': 44.392143510765095,
 '861': 51.743577257702917,
 '6946': 57.460048735035627,
 '6454': 47.50515573329389,
 '9143': 49.372142033154596,
 '9338': 49.723964201578916,
 '259': 57.236895396325913,
 '4371': 50.229698068676853,
 '7545': 45.940063385358428,
 '4668': 49.283219685397071,
 '7859': 51.723273559194801,
 '5670': 44.787884262387607,
 '9257': 47.377284184894194,
 '4479': 52.632045012855308,
 '6671': 38.045547581329849,
 '2659': 47.305013273639567,
 '2872': 51.327113485313632,
 '7638': 51.661886077692785,
 '2455': 58.296042204567911,
 '6042': 52.009110973682589,
 '1821': 49.225955713822856,
 '1218': 47.353409713646208,
 '6003': 49.082851210852176,
 '3786': 57.156344520586245,
 '2756': 53.521481706332594,
 '2234': 55.074161279947674,
 '8199': 47.675031346480694,
 '9046': 53.107012845877911,
 '3806': 45.843818477075246,
 '5605': 51.605106113710669,
 '3315': 64.606309969896344,
 '8999': 46.154335807405062,
 '347': 53.693396814445521,
 '342': 45.966380140206482,
 '8795': 48.507024012432517,
 '7441': 51.08309202174425,
 '4281': 43.079280816046705,
 '4911': 45.410646846607712,
 '3835': 46.037693322056036,
 '9196': 50.122415603058613,
 '2536': 57.550282458845984,
 '8319': 51.977193393584734,
 '1299': 63.09454041689753,
 '5504': 47.900347102803238,
 '7258': 49.367369871398097,
 '5367': 42.059534664088957,
 '1112': 61.565382847572764,
 '5363': 51.071644335011086,
 '4682': 45.299335094271058,
 '6818': 61.663612624263401,
 '9218': 49.965624568245779,
 '316': 53.879161176725546,
 '9158': 49.021937592712852,
 '5369': 42.333654511025415,
 '5066': 46.066730977358404,
 '3785': 66.801680172345584,
 '6354': 47.550676637394439,
 '4539': 44.549069012391719,
 '6278': 47.808138023278829,
 '9278': 51.523274253725155,
 '3517': 38.941888682187717,
 '7811': 46.374285420546094,
 '2150': 62.451345416691012,
 '1447': 57.632727264862453,
 '395': 47.2119810753588,
 '1625': 54.15755463837742,
 '2016': 46.902292166323605,
 '3522': 40.51900335823867,
 '4801': 39.170670477470523,
 '6571': 43.454946690284217,
 '2000': 47.652799532312706,
 '8421': 51.118795267610537,
 '1157': 58.039458738156725,
 '2010': 48.624479219743307,
 '5': 39.782141749315834,
 '3716': 52.571957043410727,
 '7882': 48.947319307176727,
 '1770': 51.281479174747879,
 '3423': 46.93183572733809,
 '6560': 42.60138919786116,
 '4749': 42.404981796974212,
 '7150': 49.989623670762754,
 '3609': 56.993339698660137,
 '2897': 44.209446655250474,
 '6430': 62.998606749365976,
 '8562': 50.231316816985256,
 '6253': 47.620878302237443,
 '6889': 55.476700120364335,
 '3078': 55.516903086836699,
 '7920': 44.646110370596439,
 '679': 51.971137462072505,
 '1332': 58.271461337721576,
 '2287': 42.97508918558492,
 '9372': 54.832061454781417,
 '124': 52.915508008031452,
 '8787': 43.989008959417248,
 '3742': 54.383355273084831,
 '9264': 51.331888292379546,
 '6402': 45.464119897428226,
 '2701': 50.773176310636146,
 '941': 50.813702953779277,
 '4391': 47.978547773101177,
 '1382': 60.229808403721634,
 '1153': 49.621504498071815,
 '875': 59.100015589810994,
 '1696': 59.452747357483645,
 '8515': 53.096800883923876,
 '6452': 38.189763862618818,
 '8387': 54.34686676460111,
 '4456': 20.580035670845014,
 '2317': 57.882664402501035,
 '9314': 52.492442831081924,
 '6397': 52.015669356889681,
 '6568': 42.884633397688361,
 '793': 40.384003185718811,
 '8804': 46.163889791059546,
 '7722': 49.170430163041154,
 '2721': 49.073359600442615,
 '7431': 54.091773207863113,
 '6071': 48.043792527306401,
 '4238': 42.123205127469667,
 '9327': 50.487832350877746,
 '476': 45.858000158587288,
 '8063': 43.662873789163385,
 '7670': 44.298544078520223,
 '2087': 39.555198528563828,
 '250': 59.531490573668378,
 '6004': 48.812290896252776,
 '7244': 44.592780474289846,
 '2767': 48.136618368082495,
 '3807': 48.283516565932715,
 '5910': 28.674596663643989,
 '6333': 47.990663083946416,
 '8638': 54.373163215464572,
 '2692': 52.451626521028118,
 '4326': 43.861603205663982,
 '6415': 42.722935468485574,
 '195': 53.635139693532267,
 '2068': 41.756528651636344,
 '858': 49.981723184318035,
 '9374': 49.744649484431726,
 '1477': 56.451655931849132,
 '5210': 51.102873744309605,
 '7790': 45.680291924794624,
 '2535': 61.835053023946266,
 '8573': 50.387078190938482,
 '1329': 56.994901181566206,
 '1316': 61.811084034081674,
 '6208': 40.967440545577176,
 '7690': 47.493111564714468,
 '1122': 52.588045773214773,
 '4173': 44.147149658666493,
 '4611': 54.385196624009083,
 '280': 56.224413559256156,
 '6640': 34.779587824057124,
 '3106': 52.071816598502664,
 '1698': 59.542199030591291,
 '6726': 41.717053056590842,
 '49': 51.833018074337076,
 '2273': 32.032320968572762,
 '4120': 44.936699245356159,
 '5584': 54.115279182085317,
 '1646': 57.839080176295369,
 '7796': 47.759493519329027,
 '8560': 46.249532303433476,
 '8715': 47.280331057410365,
 '5676': 52.647394532850846,
 '1549': 53.039431086229257,
 '4051': 48.732965319530919,
 '8789': 48.573382917478973,
 '1937': 43.021838345161861,
 '6384': 52.053663289966643,
 '1123': 45.82376667535253,
 '9187': 53.214427149591032,
 '3569': 49.805589384611757,
 '3334': 55.821981638901896,
 '8687': 49.021914122523967,
 '4096': 52.846995047004967,
 '5383': 46.994700635450513,
 '1704': 56.866486124400055,
 '7229': 49.664085409695851,
 '803': 40.471525495514079,
 '6048': 50.802476762745044,
 '6989': 50.323172960296105,
 '3353': 49.50391882404174,
 '7666': 46.057583769355197,
 '1899': 51.467689315877863,
 '2530': 67.689920348055736,
 '8240': 53.115306568794097,
 '1380': 54.175887602095429,
 '2406': 59.001310008262905,
 '2782': 48.142653788656418,
 '8393': 55.445642073696298,
 '7103': 49.318930107093749,
 '196': 52.348932279434031,
 '6119': 54.22956668265158,
 '3936': 46.009648327531075,
 '1543': 56.59954468255917,
 '2018': 45.28016182040033,
 '4588': 54.449266957427824,
 '1425': 57.980054377745986,
 '4276': 45.529618773836241,
 '2892': 44.864869091477857,
 '1934': 49.209306010353757,
 '3533': 39.135540324189854,
 '4149': 45.661049661116969,
 '431': 47.135181959629904,
 '2776': 52.783042420946572,
 '9171': 47.412856839259753,
 '6473': 59.107415250064207,
 '1349': 59.565380181564805,
 '5700': 38.137534641944242,
 '116': 63.254864533250085,
 '5904': 41.094803459297687,
 '4518': 50.359730616939302,
 '6027': 48.518455956879535,
 '7264': 49.611672328445309,
 '1038': 37.590629402229332,
 '6467': 42.784169468530052,
 '3914': 49.049247391280431,
 '3854': 45.210317295488416,
 '4026': 46.957585477411271,
 '8647': 49.07047705629212,
 '2838': 59.792933707399087,
 '436': 54.193916342421247,
 '1408': 58.40661260426517,
 '5763': 48.344272230060717,
 '2395': 68.522214207104895,
 '6239': 53.022898487296366,
 '1538': 55.105079864270834,
 '9029': 46.96308992438761,
 '8911': 48.331808049925201,
 '4650': 47.525184847343183,
 '4481': 44.803581394233142,
 '2436': 62.980920469009938,
 '9156': 45.67982375992726,
 '4187': 47.844699759682662,
 '6627': 47.481160323010641,
 '1737': 51.249986597420673,
 '5179': 49.405594033779821,
 '7661': 44.918846668778436,
 '3261': 49.899421050267051,
 '6848': 53.273186804386334,
 '7368': 53.405460465423246,
 '9140': 47.668897480199718,
 '1669': 56.543922071019153,
 '7768': 47.179357723949273,
 '6919': 56.095888262684014,
 '8315': 45.608725870290002,
 '4204': 50.390811575579683,
 '638': 39.804155753824432,
 '951': 49.770966447112727,
 '9303': 54.437769954884153,
 '5398': 59.240969153842926,
 '3130': 53.318063154792476,
 '4741': 35.96015808880329,
 '3454': 59.049658184707113,
 '1953': 51.467605013742343,
 '1448': 64.981759622911028,
 '5993': 47.860884919416122,
 '8188': 47.70307408790471,
 '2488': 59.57496507664834,
 '339': 40.678127308222528,
 '6805': 55.200089952165207,
 '5243': 54.040386890135849,
 '1650': 56.855288250409373,
 '8264': 45.66666079916245,
 '6542': 38.802586961893162,
 '7034': 46.963020248510873,
 '8091': 48.402377973811895,
 '5748': 46.185053191472321,
 '1166': 54.401727910424498,
 '7394': 44.179488226820517,
 '8016': 47.036702236303995,
 '6595': 55.910848877413372,
 '1317': 54.922232903096251,
 '1555': 49.778103842223075,
 '416': 46.055905998618208,
 '1357': 53.659724426111552,
 '9315': 51.157273401583332,
 '1570': 56.693492178799787,
 '2538': 51.036487541100684,
 '4140': 22.38453527528398,
 '9225': 48.880334402099443,
 '8621': 56.350377319013688,
 '8545': 54.580940241209611,
 '8833': 56.488037746772008,
 '4029': 45.786655666724066,
 '3069': 49.012224303372314,
 '6792': 67.824914220265526,
 '8121': 45.283011261991128,
 '6358': 48.564301732720402,
 '7833': 47.999093439765055,
 '1233': 43.649354660333579,
 '6658': 39.933738339397202,
 '2749': 49.144818005382938,
 '5470': 49.374729738937617,
 '5105': 57.430368269745671,
 '8858': 47.948686134225802,
 '9077': 46.311453038553019,
 '6747': 47.410131119333577,
 '5332': 47.831498627870097,
 '1771': 47.582785490520209,
 '5391': 52.664433086735869,
 '8316': 50.161735754356883,
 '230': 58.364151440158146,
 '7526': 53.804220801287983,
 '7411': 56.72626735673812,
 '3120': 53.839189090807302,
 '5216': 53.046479871684355,
 '9019': 45.613752373062248,
 '7556': 52.92346320547901,
 '8482': 49.117175495426316,
 '5744': 60.889554868032874,
 '2095': 66.329511587551465,
 '2442': 56.510877132755169,
 '3718': 57.787135040135311,
 '688': 39.278628175937975,
 '3244': 45.187254623018113,
 '1940': 52.058830368254796,
 '7364': 48.312828645135959,
 '5832': 56.188489348931036,
 '5231': 43.907993103354606,
 '7707': 29.711930095846476,
 '4920': 47.257897873947535,
 '6984': 57.069971245073425,
 '5063': 50.245497394307378,
 '6556': 42.273393831707622,
 '3346': 53.487158411635988,
 '780': 35.02989903535245,
 '5618': 48.828809388744368,
 '7462': 50.708753550775285,
 '6480': 57.439857680588702,
 '2174': 59.868527273242321,
 '4780': 56.376736121698777,
 '6181': 50.925176580086287,
 '1336': 63.143997856701283,
 '6023': 55.113790070767749,
 '7589': 49.258740079022338,
 '7242': 49.255681630997039,
 '5875': 45.394717625999867,
 '8062': 41.57760470111198,
 '5745': 62.838254217393484,
 '3192': 49.035633205222794,
 '6369': 43.091635088825313,
 '2410': 49.356957677084353,
 '7284': 42.808319116685297,
 '650': 44.057510476491665,
 '2358': 62.412348788823792,
 '1783': 49.216611326892945,
 '8888': 52.002307496538783,
 '2277': 44.715558707402295,
 '8753': 45.535484933787771,
 '3380': 53.783258007431918,
 '3171': 52.727351840518715,
 '3565': 46.17412578678465,
 '1800': 47.491380215961712,
 '7274': 44.860769018607044,
 '3822': 52.214913411809647,
 '7097': 47.412239192920921,
 '884': 56.598232006461174,
 '4977': 46.054826078874605,
 '8484': 52.373898229068189,
 '2709': 51.269432190090455,
 '1267': 54.113066280834964,
 '6194': 50.760041849728964,
 '3443': 50.914882043323615,
 '1433': 65.401291432986142,
 '8444': 54.549438403878192,
 '9378': 47.405273979960015,
 '9116': 49.871207337907791,
 '4166': 54.098779450802716,
 '8561': 48.016823351451208,
 '3857': 41.886471261021839,
 '1260': 54.623472369822792,
 '2934': 53.269152624453611,
 '7819': 49.093004401942103,
 '9371': 55.298835371624676,
 '2931': 51.947194230012116,
 '3362': 49.678196563415405,
 '6699': 45.49941156768255,
 '357': 49.859934998041922,
 '2726': 45.494770264119623,
 '6822': 55.033453564107788,
 '325': 50.429181640730974,
 '2657': 47.386663918011401,
 '2072': 41.822496266908146,
 '3840': 48.820340063380478,
 '7428': 48.026888636467334,
 '5783': 54.750241395936136,
 '7197': 42.973263421753941,
 '4339': 48.376853358253356,
 '1720': 53.78713706831924,
 '1960': 49.918744527846755,
 '3938': 46.959434343100277,
 '8773': 49.417271561851621,
 '604': 49.83541674201274,
 '7287': 40.581187576465979,
 '3133': 52.390798647038437,
 '4360': 16.94767433345525,
 '7561': 45.265164613549778,
 '1711': 64.637114997236907,
 '7211': 42.131820975864287,
 '842': 48.222340928856816,
 '1816': 43.046134922766711,
 '4488': 30.955548878987933,
 '6183': 51.113005946206826,
 '997': 42.142505201969151,
 '7908': 44.65753199553464,
 '7979': 48.691147949807444,
 '7940': 42.682433776216548,
 '4446': 31.430056423101309,
 '583': 50.540302261770869,
 '8681': 46.824610329375346,
 '1921': 45.280056897676289,
 '5821': 54.766958586123877,
 '466': 49.901319944072355,
 '4036': 53.12036252768975,
 '5857': 59.057480901725029,
 '8652': 48.165002910141126,
 '6203': 48.822881927890883,
 '5851': 56.876440061627392,
 '2682': 51.866561954048386,
 '533': 54.755648503758813,
 '8127': 47.135222933874168,
 '170': 50.350121345682318,
 '4973': 46.837393119268519,
 '6416': 42.609412720126677,
 '3555': 47.609526061831552,
 '5533': 50.093835248477134,
 '7233': 46.433589418008303,
 '413': 50.046058525181067,
 '2485': 57.314791054113158,
 '3559': 43.800997178954688,
 '5375': 44.628063885125123,
 '1836': 52.055190954174549,
 '9101': 48.952458751750299,
 '1393': 53.115388357372467,
 '6600': 44.67890587740699,
 '8049': 48.948566541344753,
 '2392': 51.82027239339736,
 '8987': 53.416838068384784,
 '6979': 53.024418555791947,
 '4663': 48.05448473832903,
 '7052': 49.885886925836111,
 '1790': 49.657426312547784,
 '5316': 50.263644650435218,
 '5925': 39.435329490609575,
 '6486': 41.22161595577807,
 '5921': 36.813801499935003,
 '3118': 50.16303097755987,
 '2788': 49.381232278763001,
 '5045': 50.10289045487059,
 '848': 45.290391792059964,
 '1568': 58.265919036686014,
 '5530': 46.569665823696354,
 '3197': 51.152781304563902,
 '795': 40.809914305185018,
 '908': 47.801408577662578,
 '5920': 25.987227287127673,
 '7934': 48.654227471041928,
 '5557': 37.615032138850864,
 '1522': 60.608980824662112,
 '8381': 54.660679240084647,
 '9105': 49.64286899182693,
 '6337': 50.528775556577678,
 '2479': 63.427904080236679,
 '5485': 50.318965424265627,
 '8763': 49.135802755336456,
 '3891': 49.367845939188385,
 '3236': 52.618142138665377,
 '2561': 51.252504160646211,
 '3027': 49.270484312231858,
 '5461': 49.18845499721256,
 '387': 49.487781229160959,
 '8691': 48.348715365121535,
 '2017': 47.041433318263365,
 '8710': 47.823930641199965,
 '9396': 47.556051465345874,
 '6235': 45.862139746897796,
 '8641': 53.793175284851969,
 '6429': 63.871088360803263,
 '6255': 46.239851485513327,
 '7763': 54.041014063625759,
 '5283': 48.818055163993989,
 '5989': 39.305515779678814,
 '2528': 69.565834194819161,
 '2151': 61.977556447707599,
 '4905': 51.814420904861109,
 '6863': 50.288247491934811,
 '4796': 38.960373539007598,
 '2582': 55.892097769031864,
 '1856': 50.372400374924702,
 '6113': 52.836884117099437,
 '2758': 47.847050010822407,
 '3072': 63.76555214550207,
 '6264': 45.483339806122714,
 '1415': 67.496271037732456,
 '2332': 64.795851722039743,
 '2035': 49.31364579017928,
 '144': 71.232049274563906,
 '1274': 50.722803955959094,
 '4664': 48.754883379029437,
 '3273': 49.710397878323263,
 '1167': 48.55477360026223,
 '6140': 54.166744043988047,
 '1657': 50.108717207236495,
 '6763': 61.474295067351164,
 '6565': 38.453730835866295,
 '3370': 49.962563861269984,
 '839': 43.600594449575908,
 '1247': 51.894344348537309,
 '143': 69.167371931141389,
 '8272': 49.551965293287743,
 '190': 54.967761462534263,
 '8645': 53.5473301470427,
 '266': 54.296785929595217,
 '1082': 39.099988442481987,
 '6952': 53.907596745765389,
 '5947': 42.525151769271567,
 '8219': 49.805260228895079,
 '1512': 61.885361408032153,
 '6941': 60.992854827636222,
 '1351': 59.702041367646942,
 '5246': 44.077830441609038,
 '439': 55.992465957468369,
 '3986': 50.952692327379495,
 '3138': 57.957412719195183,
 '5769': 63.11229099928795,
 '8492': 52.318122825636387,
 '8251': 46.437364133190997,
 '6961': 49.18407001562025,
 '7512': 57.525422878530648,
 '4207': 49.353170096995427,
 '7753': 48.096673716460359,
 '8994': 50.815634891495279,
 '915': 52.933437105522081,
 '1913': 46.039058339891028,
 '8855': 44.394830538215601,
 '7047': 47.999589132557084,
 '3388': 50.145209231326312,
 '3046': 40.683355516623955,
 '1430': 60.267828309538977,
 '109': 55.813134200011248,
 '751': 47.102268253081455,
 '8462': 54.52461687252449,
 '3577': 50.629050544737744,
 '5640': 51.260746801069885,
 '5736': 53.038439148261006,
 '8337': 58.896420450455651,
 '2661': 48.81478957026836,
 '7903': 54.028775960092858,
 ...}

In [127]:
PE.kSharesPerContribAfterCoinFlip(res,inExifFl,inGidAidMapFl,inAidFtrFl, lambda : 70)


Out[127]:
{'all': 3252.0, 'giraffes': 195.8, 'zebras': 3063.315789473684}

In [118]:
len(obj.preds)


Out[118]:
6469

In [162]:
df, titleSuffix = PE.buildErrPlots('clf')

In [156]:
df, titleSuffix = PE.buildErrPlots('clf')
attribTypes = ['beauty']
figs = []
for attrib in attribTypes:
    attribCol = [col for col in df.columns if attrib in col]
    attribDf = df[attribCol]
    titleAttrib = "All %s %s" %(attrib,titleSuffix)
    figs.append(attribDf.iplot(kind='line',title=titleAttrib))

figCodes = [fig.embed_code for fig in figs]

In [151]:
titleSuffix


Out[151]:
'classifiers top k choices'

In [157]:
figCodes


Out[157]:
['<iframe id="igraph" scrolling="no" style="border:none;" seamless="seamless" src="https://plot.ly/~smenon8/497.embed" height="525px" width="100%"></iframe>']

In [167]:
for col in df.columns:
    if 'all' in col:
        df[str(col+'_err')] = (3620 - df[col]) / 36.20

In [168]:
df.head()


Out[168]:
all_bayesian_beauty giraffes_bayesian_beauty zebras_bayesian_beauty all_logistic_beauty giraffes_logistic_beauty zebras_logistic_beauty all_svm_beauty giraffes_svm_beauty zebras_svm_beauty all_dtree_beauty ... zebras_random_forests_beauty all_ada_boost_beauty giraffes_ada_boost_beauty zebras_ada_boost_beauty all_bayesian_beauty_err all_logistic_beauty_err all_svm_beauty_err all_dtree_beauty_err all_random_forests_beauty_err all_ada_boost_beauty_err
num_images
2 649.000000 8.0 1071.0 649.000000 8.0 1071.0 649.000000 8.0 1071.0 649.000000 ... 1071.0 649.000000 8.0 1071.0 82.071823 82.071823 82.071823 82.071823 82.071823 82.071823
3 1232.500000 12.0 2044.0 1232.500000 12.0 2044.0 1232.500000 12.0 2044.0 1232.500000 ... 2044.0 1232.500000 12.0 2044.0 65.953039 65.953039 65.953039 65.953039 65.953039 65.953039
4 2160.000000 14.0 3666.0 2160.000000 14.0 3666.0 2160.000000 14.0 3666.0 2160.000000 ... 3666.0 2160.000000 14.0 3666.0 40.331492 40.331492 40.331492 40.331492 40.331492 40.331492
5 3219.500000 17.0 5520.0 3219.500000 17.0 5520.0 3219.500000 17.0 5520.0 3219.500000 ... 5520.0 3219.500000 17.0 5520.0 11.063536 11.063536 11.063536 11.063536 11.063536 11.063536
6 3107.333333 20.0 4002.0 3107.333333 20.0 4002.0 3107.333333 20.0 4002.0 3107.333333 ... 4002.0 3107.333333 20.0 4002.0 14.162063 14.162063 14.162063 14.162063 14.162063 14.162063

5 rows × 24 columns


In [1]:
import pandas as pd
import json
import re
from datetime import datetime

In [2]:
with open("../data/Flickr_EXIF_full.json", "r") as exiffl:
    d = json.load(exiffl)
df_exif = pd.DataFrame.from_dict(d).transpose()

In [10]:
with open("../data/beautyFeatures_FlickrExtracts.json", "r") as btyFl:
    dBty = json.load(btyFl)

# dBty_mod = {}
# for img in dBty.keys():
#     mod_img = re.findall(r'([0-9]*)_.*',img)[0]
#     dBty_mod[mod_img] = dBty[img]

df_bty = pd.DataFrame.from_dict(dBty).transpose()

In [15]:
df_exif.reset_index(inplace=True)
df_bty.reset_index(inplace=True)

In [17]:
df = pd.DataFrame.merge(df_exif, df_bty)
df.index = df['index']

In [19]:
df['date'] = df['date'].apply(lambda x : datetime.strptime(str(x),'%Y-%m-%d %H:%M:%S'))
df['day'] = df.date.apply(lambda x : x.day)
df['hour'] = df.date.apply(lambda x : x.hour)
df.drop(['index', 'date'],1,inplace=True)

In [20]:
df.to_csv("../data/Flickr_Scrapes_Ftrs.csv")

In [1]:
import PopulationEstimatorAPI as PE



In [2]:
train_fl = "../data/BeautyFtrVector_GZC_Expt2.csv"
test_fl = "../data/Flickr_Scrapes_Ftrs.csv"
meth = 'lasso'
attrib = 'beauty'
methArgs = {'linear' : {'fit_intercept' : True},
            'ridge' : {'fit_intercept' : True},
            'lasso' : {'fit_intercept' : True},
            'elastic_net' : {'fit_intercept' : True},
            'svr' : {'fit_intercept' : True},
            'dtree_regressor' : {'fit_intercept' : True}}
methObj,predResults = PE.trainTestRgrs(train_fl,
                                test_fl,
                                meth,
                                attrib,
                                infoGainFl="../data/infoGainsExpt2.csv",
                                methArgs = methArgs
                                )


Number of outliers identified: 0
1701 1701

In [3]:
max(predResults.values()), min(predResults.values())


Out[3]:
(78.140077977527866, 31.369773817297357)

In [9]:
imgs = list(methObj.test_x.index)

In [11]:
with open("../data/fileURLS.dat") as urlFls:
    urls = urlFls.read().split("\n")

In [28]:
flUrlDict = {}
for img in imgs:
    for url in urls:
        if str(img) in url:
            flUrlDict[str(img)] = url

In [29]:
with open("Flickr_FL_URL_map.json", "w") as fl:
    json.dump(flUrlDict, fl, indent = 4)

In [26]:
df = pd.DataFrame.from_csv("../data/BeautyFtrVector_GZC_Expt2.csv")

In [23]:
def rotation_to_orientation(theta):
    if theta == 0:
        return 1
    elif theta == 90:
        return 8
    else:
        return 6

In [24]:
df['orientation'] = df['rotation'].apply(rotation_to_orientation)

In [27]:
df.drop(['lat', 'long', 'day', 'rotation'], 1, inplace=True)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-27-be0d7979472a> in <module>()
----> 1 df.drop(['lat', 'long', 'day', 'rotation'], 1, inplace=True)
      2 df.to_csv("/tmp/testing_fl_flickr.csv")

/Users/sreejithmenon/anaconda/lib/python3.5/site-packages/pandas/core/generic.py in drop(self, labels, axis, level, inplace, errors)
   1875                 new_axis = axis.drop(labels, level=level, errors=errors)
   1876             else:
-> 1877                 new_axis = axis.drop(labels, errors=errors)
   1878             dropped = self.reindex(**{axis_name: new_axis})
   1879             try:

/Users/sreejithmenon/anaconda/lib/python3.5/site-packages/pandas/indexes/base.py in drop(self, labels, errors)
   3049             if errors != 'ignore':
   3050                 raise ValueError('labels %s not contained in axis' %
-> 3051                                  labels[mask])
   3052             indexer = indexer[~mask]
   3053         return self.delete(indexer)

ValueError: labels ['lat' 'long' 'day' 'rotation'] not contained in axis

In [28]:
df.to_csv("/tmp/testing_fl_flickr.csv")

In [ ]: