我只想使用Python在Matlab中完成以下操作:
p(p==0) = 0.001 ; p(p == 1) = 0.999;
tVar = .5*log(p ./ (1 - p))
该操作包含Logit转换:
我在Python中尝试了以下1)无效:
逻辑前脚本代码:
def iLogit(a):
return [.0001 if x==0 else x for x in a]
有一个错误:
> A field name was not found or there were unbalanced quotation marks.
> ERROR 999999: Error executing function. Failed to execute
> (CalculateField).
请帮忙吗?