- 积分
- 1626
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-1-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
def plot_ts(tsarray):
for ts in tsarray:
xs = ts/(1+ts) #zero
precision = arange(xs+0.001,1.01,0.01)
pod = precision/(precision*(1+1/ts)-1)
plot(precision,pod,'b--',lindwidth=1)
xlim(0,1)
ylim(0,1)
text(2*xs-0.02,2*xs-0.02,'ts='+str(ts),fontsize=16)
def plot_bias(biasarray):
precision =arange(0,1.01,0.1)
n = len(biasarray)
for i in range(n):
bias = biasarray[i*precision
plot(precision,bias,'--',lindwidth=1)
xlim(0,1)
ylim(0,1)
bias = precision
plot(precision,bias,'-',lindwidth=1)
xlim(0,1)
ylim(0,1)
for i in range(n):
if(i<4):
text((1*0.775)/biasarray[i+0.1,0.89,'bias='+str(biasarray[i),coordinates='figure',fontsize=16)
else:
text(0.91,0.775*biasarray[i+0.1,'bias='+str(biasarray[i),coordinates='figure',fontsize=16)
#plot
tss = arange(0.1,1.0,0.1)
figure(figsize=[800,800)
ax=axes(position=[0.13,0.11,0.775,0.775,aspect='equal',clop=False)
plot_ts(tss)
biass = array([5,2.5,1.67,1.25,0.8,0.6,0.4,0.2)
plot_bias(biass)
precision01 = 0.3
pod01 = 0.5
s01 = scatter(precision01,pod01,'S',color = 'r')
precision10 = 0.4
pod10 = 0.6
s02 = scatter(precision10,pod10,'S',color = 'g')
legend([s01,s02)
xlabel(u'成功率',fontname=u'黑体',fontsize=16)
ylabel(u'命中率',fontname=u'黑体',fontsize=16)
|
-
说明
-
运行结果
|