用法:
clx.analytics.anomaly_detection.dbscan(feature_dataframe, min_samples=3, eps=0.3)
将特征 DataFrame 传递给此函数以检测特征 DataFrame 中的异常。该函数使用
cuML
DBSCAN 检测异常并输出相关标签 0,1,-1。- :param feature_dataframe: Feature dataframe to be used for clustering:
- :type feature_dataframe: cudf.DataFrame:
- :param min_samples: Minimum samples to use for dbscan:
- :type min_samples: int:
- :param eps: Max distance to use for dbscan:
- :type eps: float:
参数:
例子:
>>> import cudf >>> import clx.features >>> import clx.analytics.anomaly_detection >>> df = cudf.DataFrame( >>> { >>> "time": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], >>> "user": ["u1","u1","u1","u1","u1","u1","u1","u1","u1","u1","u5","u4","u2","u3"], >>> "computer": ["c1","c2","c3","c1","c2","c3","c1","c1","c2","c3","c1","c1","c5","c6"], >>> } >>> ) >>> feature_df = clx.features.frequency(df, entity_id="user", feature_id="computer") >>> labels = clx.analytics.anomaly_detection.dbscan(feature_df, min_samples=2, eps=0.5) >>> labels 0 -1 1 -1 2 -1 dtype: int32
相关用法
- Python clx.analytics.asset_classification.AssetClassification.predict用法及代码示例
- Python clx.analytics.asset_classification.AssetClassification.save_model用法及代码示例
- Python clx.analytics.asset_classification.AssetClassification.load_model用法及代码示例
- Python clx.analytics.asset_classification.AssetClassification.train_model用法及代码示例
- Python clx.analytics.loda.Loda.score用法及代码示例
- Python clx.analytics.dga_detector.DGADetector.evaluate_model用法及代码示例
- Python clx.analytics.dga_detector.DGADetector.predict用法及代码示例
- Python clx.analytics.dga_detector.DGADetector.train_model用法及代码示例
- Python clx.analytics.loda.Loda.explain用法及代码示例
- Python clx.analytics.loda.Loda.fit用法及代码示例
- Python clx.analytics.stats.rzscore用法及代码示例
- Python clx.ip.is_ip用法及代码示例
- Python clx.ip.hostmask用法及代码示例
- Python clx.osi.virus_total.VirusTotalClient.file_rescan用法及代码示例
- Python clx.osi.virus_total.VirusTotalClient.url_report用法及代码示例
- Python clx.ip.is_global用法及代码示例
- Python clx.osi.virus_total.VirusTotalClient.ipaddress_report用法及代码示例
- Python clx.ip.ip_to_int用法及代码示例
- Python clx.osi.virus_total.VirusTotalClient.file_scan用法及代码示例
- Python clx.osi.virus_total.VirusTotalClient.scan_big_file用法及代码示例
注:本文由纯净天空筛选整理自rapids.ai大神的英文原创作品 clx.analytics.anomaly_detection.dbscan。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。