In [1]:
import pickle

with open('model15_track_l1_ratio.pkl', 'rb') as f:
    l1_ratios = pickle.load(f)

In [2]:
list(l1_ratios.keys())


Out[2]:
[0.5,
 0.51025641025641022,
 0.7153846153846154,
 0.73589743589743595,
 0.54102564102564099,
 0.69487179487179485,
 0.78717948717948716,
 0.52051282051282055,
 0.56153846153846154,
 0.6333333333333333,
 0.80769230769230771,
 0.87948717948717947,
 0.57179487179487176,
 0.76666666666666661,
 0.79743589743589749,
 0.90000000000000002,
 0.58205128205128209,
 0.64358974358974352,
 0.74615384615384617,
 0.88974358974358969,
 0.70512820512820507,
 0.86923076923076925,
 0.59230769230769231,
 0.66410256410256407,
 0.83846153846153848,
 0.81794871794871793,
 0.68461538461538463,
 0.77692307692307694,
 0.65384615384615385,
 0.61282051282051286,
 0.82820512820512815,
 0.85897435897435903,
 0.62307692307692308,
 0.67435897435897441,
 0.53076923076923077,
 0.8487179487179487,
 0.75641025641025639,
 0.60256410256410253,
 0.72564102564102562,
 0.55128205128205132]

In [46]:
l1_ratios[0.5].keys()


Out[46]:
dict_keys(['coef_', 'predictions', 'alpha_'])

In [27]:
%matplotlib inline

In [28]:
import pylab

In [62]:
pylab.rcParams['figure.figsize'] = 18, 10
l1 = 0.5
pylab.scatter(range(len(l1_ratios[l1]['coef_'])), l1_ratios[l1]['coef_'], 1, color='r', alpha=0.5)
print("total: ", len(l1_ratios[l1]['coef_']))
print(l1)
l1 = 0.77692307692307694
pylab.scatter(range(len(l1_ratios[l1]['coef_'])), l1_ratios[l1]['coef_'], 1, color='g', alpha=0.5)
print("total: ", len(l1_ratios[l1]['coef_']))
print(l1)
l1 = 0.9
pylab.scatter(range(len(l1_ratios[l1]['coef_'])), l1_ratios[l1]['coef_'], 1, color='b', alpha=0.5)
print("total: ", len(l1_ratios[l1]['coef_']))
print(l1)


total:  7589
0.5
total:  7589
0.7769230769230769
total:  7589
0.9

In [ ]: