本文整理汇总了Python中Orange.data.ContinuousVariable.ci_attrs方法的典型用法代码示例。如果您正苦于以下问题:Python ContinuousVariable.ci_attrs方法的具体用法?Python ContinuousVariable.ci_attrs怎么用?Python ContinuousVariable.ci_attrs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orange.data.ContinuousVariable
的用法示例。
在下文中一共展示了ContinuousVariable.ci_attrs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _predict_as_table
# 需要导入模块: from Orange.data import ContinuousVariable [as 别名]
# 或者: from Orange.data.ContinuousVariable import ci_attrs [as 别名]
def _predict_as_table(self, prediction, confidence):
from Orange.data import Domain, ContinuousVariable
means, lows, highs = [], [], []
n_vars = prediction.shape[2] if len(prediction.shape) > 2 else 1
for i, name in zip(range(n_vars),
self._table_var_names or range(n_vars)):
mean = ContinuousVariable('{} (forecast)'.format(name))
low = ContinuousVariable('{} ({:d}%CI low)'.format(name, confidence))
high = ContinuousVariable('{} ({:d}%CI high)'.format(name, confidence))
low.ci_percent = high.ci_percent = confidence
mean.ci_attrs = (low, high)
means.append(mean)
lows.append(low)
highs.append(high)
domain = Domain(means + lows + highs)
X = np.column_stack(prediction)
table = Timeseries.from_numpy(domain, X)
table.name = (self._table_name or '') + '({} forecast)'.format(self)
return table