存储离群点概率
通过编写循环遍历 estimators 并生成离群点概率的代码块,继续构建集成模型。
带有额外特征且已缩放的 apple 数据集已提供。
本练习是课程的一部分
Python 中的异常检测
交互式实操练习
通过完成这段示例代码来试试这个练习。
estimators = [IForest(n_estimators=50), IForest(n_estimators=100)]
shape = (len(apple), len(estimators))
probability_scores = np.empty(shape=shape)
for ____, ____ in ____:
# Fit the estimator
____