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()
In [672]:
pf.exp_ss_mat(keys=[-2])
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]:
In [1431]:
#xfe.save("result", ddf)
#ddf
In [1433]:
ddf.sort(columns=["sensitivity", "precision", "accuracy"])[-10:]
Out[1433]:
In [982]:
fig = plt.figure(figsize=(18, 32))
xfp.roc_curve_plus(fig=fig, data=ddf)
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)
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)
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]:
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)
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])
In [1450]:
Out[1450]:
In [ ]: