In [719]:
rks = [
    "lib.exp.tools.configurator",
    "lib.exp.base", "lib.exp.tools", "lib.exp.pairing.ext",
    "lib.exp.pairing.data_tuner", "lib.exp.pairing.conf",
    "lib.exp.pairing.common", "lib.exp.pairing.base",
    "lib.exp.pairing"]
reload_mods(rks)

dn = ('univ_07', 'coates')

from lib.exp.tools import ToolHelper as TH
from lib.exp.featx import Featx
if 'fx' not in locals():
  fx = Featx(*dn)

from lib.exp.pairing import PairFeats as PF
pf = PF(fx)
pf.warmup()


Current Configs:
  area:True, bbft:0.9, homo:False, invw:0, mm:10, name:coates, octaf:0, root:univ_07, thres:0, 
override reloading matcher

In [672]:
pf.exp_ss_mat(keys=[-2])


Current Configs:
  area:True, bbft:0.8, homo:False, invw:2, mm:10, name:coates, octaf:0, root:univ_07, thres:10.0, 
override reloading pcore

In [582]:
#pf.exp_ss_mat(keys=range(0, 18), ss=-1)
#pf.exp(keys=range(0, 18), fs=-1)

In [677]:
df = pf.load("ss_d80_ra1000_rm10_iw0_ot0_NoHomo_Area")
fig = plt.figure(figsize=(10, 10))
ax = fig.add_subplot(111)
cax = ax.matshow(rdf.area_ratio.reshape(48,48), vmax=2., interpolation='nearest')
cb = fig.colorbar(cax, fraction=.047, pad=.01)



In [682]:
fig = plt.figure(figsize=(10, 10))
ax = fig.add_subplot(111)
cax = ax.matshow(df.inv_rdist.reshape(48,48), interpolation='nearest')
cb = fig.colorbar(cax, fraction=.047, pad=.01)



In [681]:
df = pf.load("ss_d80_ra1000_rm10_iw2_ot0_NoHomo_Area")
fig = plt.figure(figsize=(10, 10))
ax = fig.add_subplot(111)
cax = ax.matshow(df.rdist.reshape(48,48), interpolation='nearest')
cb = fig.colorbar(cax, fraction=.047, pad=.01)



In [939]:
xfe.preview = 0
ddf = xfe.roc_details(keys=range(0, 18))

In [920]:
ddf.describe()


Out[920]:
accuracy fdr precision sensitivity speficity
count 216.000000 216.000000 216.000000 216.000000 216.000000
mean 0.874278 0.307403 0.600005 0.708947 0.904450
std 0.139555 0.169024 0.236195 0.293261 0.157181
min 0.074016 0.000000 0.000000 0.000000 0.026071
25% 0.891339 0.223881 0.602649 0.520408 0.897579
50% 0.902362 0.300000 0.659507 0.867347 0.929236
75% 0.918504 0.381998 0.769231 0.928571 0.972067
max 0.938583 0.955390 0.814286 0.989796 1.000000

8 rows × 5 columns


In [1431]:
#xfe.save("result", ddf)
#ddf

In [1433]:
ddf.sort(columns=["sensitivity", "precision", "accuracy"])[-10:]


Out[1433]:
accuracy fdr key name precision sensitivity speficity
96 0.885039 0.422360 Bot Area Ans Ransac(1px) 0.577640 0.948980 0.873371
120 0.850394 0.491892 Bot Area Ans Ransac(10px) 0.508108 0.959184 0.830540
132 0.812598 0.549763 Bot Area Ans Ransac(20px) 0.450237 0.969388 0.783985
192 0.829921 0.525000 Bot Area Ans InvRansac(^2) 0.475000 0.969388 0.804469
204 0.861417 0.472527 Bot Area Ans InvRansac(^3) 0.527473 0.979592 0.839851
156 0.881890 0.431953 Bot Area Ans InvRansac(^2) 0.568047 0.979592 0.864060
168 0.886614 0.421687 Bot Area Ans InvRansac(^3) 0.578313 0.979592 0.869646
180 0.850394 0.492147 Bot Area Ans InvRansac(^1) 0.507853 0.989796 0.824953
144 0.872441 0.451977 Bot Area Ans InvRansac(^1) 0.548023 0.989796 0.851024
108 0.886614 0.422619 Bot Area Ans Ransac(5px) 0.577381 0.989796 0.867784

10 rows × 7 columns

Single Data ROC plots


In [982]:
fig = plt.figure(figsize=(18, 32))
xfp.roc_curve_plus(fig=fig, data=ddf)


Figure saved to data/fig/xframe/roc_curve_plus/univ_07_coates.eps

Texers Coverages, Hit ratio


In [1362]:
rks = [
    "lib.texer.nsf_cov_tab",
    "lib.texer.nsf_roc_tab", "lib.texer",
]
reload_mods(rks)

from lib.texer import Texer
tex = Texer()

#print tex.no_sf_roc(ddf)
df = xfe.coverages(keys=range(0, 18))
sels = [0, 1, 5, 6, 7]
print tex.nsf_cov(df, sels)

In [1371]:
xfe.save("classified_cov_result", df)

Get best single result


In [1395]:
#df = df[["fid", "bot_area", "top50", "bot_area_ans", "top50_ans", "bot_area_gnd"]]
df = xfe.roc_df(key=9)  
for si in range(0, 300, 70):
    # break
    fig = plt.figure(figsize=(18, 12))
    xfp.ns_frame_list(fig=fig, data=df, st=si)

In [1365]:
seg = xfe.gnd.load('segments')
xfe.gnd.update_segment()
xfe.gnd.save("m_segments", seg)


Finished update segments

In [1357]:
df = xfe.gnd.univ_df()
df = xfe.gnd.segments_df(df)
xfe.gnd.save("segments", df)

In [1367]:


In [1388]:
aa = dict(a=1, b=2)
'a' in aa


Out[1388]:
True

In [1465]:
rks = [
    "lib.exp.evaluator.ground_truth",
    "lib.exp.tools.configurator",
    "lib.exp.base", "lib.exp.tools", "lib.exp.pairing.ext",
    "lib.exp.pairing.data_tuner", "lib.exp.pairing.conf",
    "lib.exp.pairing.common", "lib.exp.pairing.base",
    "lib.exp.pairing"]
reload_mods(rks)

dn = ('univ_07', 'coates')

from lib.exp.tools import ToolHelper as TH
from lib.exp.featx import Featx
if 'fx' not in locals():
  fx = Featx(*dn)

from lib.exp.pairing import PairFeats as PF
pf = PF(fx)
pf.warmup()

rks = [
    "lib.exp.evaluator.ground_truth",
    "lib.exp.evaluator.slide_coverage",
    "lib.exp.evaluator.accuracy.base", "lib.exp.evaluator.accuracy",
    "lib.exp.xframes.base", "lib.exp.xframes.core", "lib.exp.xframes",
    "lib.exp.evaluator.xframes.base", "lib.exp.evaluator.xframes.roc_detail",
    "lib.exp.evaluator.xframes.scov",
    "lib.exp.evaluator.xframes"]
reload_mods(rks)

from lib.exp.xframes import xFrames
xf = xFrames(pairs=pf)

from lib.exp.evaluator.xframes import XframeEval as Xfe
xfe = Xfe(xf)

rks = [
    "lib.plotter.xframes.frames", "lib.plotter.xframes.mater",
    "lib.plotter.xframes.roc_grid", "lib.plotter.xframes"
]
reload_mods(rks)

from lib.plotter.xframes import XframePlotter as Xfp
xfp = Xfp(xfe)


Current Configs:
  area:True, bbft:0.9, homo:False, invw:0, mm:10, name:coates, octaf:0, root:univ_07, thres:0, 
override reloading matcher
Current Configs:
  gmmc:2, 
preload gnd

Pairwise characteristic comparisons


In [1468]:
df = pf.load("rs_d80_ra1000_rm10_iw2_ot0_NoHomo_Area")
fig = plt.figure(figsize=(18, 15))
xfp.dist_mat(fig=fig, data=df, st=200, obk=[0,1,2])
fig = plt.figure(figsize=(18, 10))
xfp.dist_mat(fig=fig, data=df, st=200, obk=[3,4])


Figure saved to data/fig/xframe/dist_mat/univ_07_coates_s200_o0,1,2.eps
Figure saved to data/fig/xframe/dist_mat/univ_07_coates_s200_o3,4.eps

In [1450]:



Out[1450]:
'1,2,3'

In [ ]: