python-3.x - 对随机森林的对抗性攻击
问题描述
我正在尝试使用Adversarial Robustness Toolkit并创建一个强大的随机森林模型,并在下面创建模型。
from sklearn.ensemble import RandomForestClassifier
model = RandomForestClassifier(n_estimators=50)
from art.estimators.classification.scikitlearn import ScikitlearnRandomForestClassifier
classifier = ScikitlearnRandomForestClassifier(model=model)
classifier.fit(x_train, y_train)
predictions = classifier.predict(x_test)
如何测试我的模型对对抗性攻击的稳健性?或者我怎样才能发起攻击?
解决方案
推荐阅读
- nginx - 无法启用 geoip 阻止 nginx - [emerg] 未知指令“geoip_country”
- mysql - MySql Workbench:删除后行返回
- javascript - 错误:无法解析 InMemoryStorageStrategy 的所有参数:(?)
- pandas - 连接列熊猫
- laravel-8 - '/admin' 返回资源未找到 Laravel 8
- python - Django - PDF 文件未上传但路径可用
- css - 调整 mat-form-field 浮动标签间隙
- kubernetes - 在 kubernetes 上使用 fluentd 为每个容器登录到不同的文件
- ibm-doors - 按对象后代过滤 RATIONAL DOORS 9.6
- sql - 如何在 BigQuery 上展开数组以将列添加到现有表