知道 kdd99_feature_extractor 吗?
时间: 2023-08-21 18:04:41 浏览: 188
是的,我熟悉 kdd99_feature_extractor。它是一个用于从原始KDD Cup 1999数据集中提取网络流量特征的工具。KDD Cup 1999数据集是一个广泛用于网络入侵检测研究的数据集,其中包含大量的网络连接记录。
kdd99_feature_extractor工具可以帮助您从原始数据集中提取出各种网络连接的特征,包括源IP地址、目标IP地址、源端口、目标端口、网络协议等。这些特征可以用于构建入侵检测系统或进行网络流量分析。
该工具一般使用Python编写,并且通常会依赖一些数据处理库,如Pandas和NumPy。使用kdd99_feature_extractor,您可以轻松地将原始数据集转换为可用于机器学习或其他分析任务的格式。
请注意,kdd99_feature_extractor是一个第三方工具,我无法提供详细的代码或安装说明。但您可以在GitHub等开源代码托管平台上找到相关的代码库和使用说明。
相关问题
有sql脚本如下:use kdd99; create table kdd99_accounts ( account_id integer, district_id integer, frequency varchar(20), date DATE ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/kdd99_accounts.csv' into table kdd99_accounts CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; create table Kdd99_card( card_id integer, disp_id integer, issued DATE, type varchar(10) ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Kdd99_card.csv' into table Kdd99_card CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; create table Kdd99_disp( disp_id integer, client_id integer, account_id integer, type varchar(6) ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Kdd99_disp.csv' into table Kdd99_disp CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; create table Kdd99_trans( trans_id integer,account_id integer,date date,type varchar(2),operation varchar(20),amount long,balance long,k_symbol varchar(20),bank varchar(4),account long ); load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/Kdd99_trans.csv' into table Kdd99_trans CHARACTER SET gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';请问如何验证客户开通信用卡之后,其账户余额相较于开卡之前是否有提升
可以通过以下SQL语句来验证客户开通信用卡之后,其账户余额是否有提升:
```
SELECT
kdd99_accounts.account_id,
kdd99_accounts.frequency,
SUM(CASE WHEN Kdd99_trans.type = 'PRIJEM' THEN Kdd99_trans.amount ELSE 0 END) - SUM(CASE WHEN Kdd99_trans.type = 'VYDAJ' THEN Kdd99_trans.amount ELSE 0 END) AS balance_before_card,
SUM(CASE WHEN Kdd99_trans.type = 'PRIJEM' AND Kdd99_trans.trans_id > (SELECT MIN(Kdd99_trans.trans_id) FROM Kdd99_trans WHERE Kdd99_trans.account_id = kdd99_accounts.account_id AND Kdd99_trans.type = 'VYBER' AND Kdd99_trans.date > Kdd99_card.issued) THEN Kdd99_trans.amount ELSE 0 END) - SUM(CASE WHEN Kdd99_trans.type = 'VYDAJ' AND Kdd99_trans.trans_id > (SELECT MIN(Kdd99_trans.trans_id) FROM Kdd99_trans WHERE Kdd99_trans.account_id = kdd99_accounts.account_id AND Kdd99_trans.type = 'VYBER' AND Kdd99_trans.date > Kdd99_card.issued) THEN Kdd99_trans.amount ELSE 0 END) AS balance_after_card
FROM
Kdd99_disp
JOIN Kdd99_card ON Kdd99_disp.disp_id = Kdd99_card.disp_id
JOIN kdd99_accounts ON Kdd99_disp.account_id = kdd99_accounts.account_id
LEFT JOIN Kdd99_trans ON Kdd99_trans.account_id = kdd99_accounts.account_id
WHERE
Kdd99_card.type = 'VISA'
GROUP BY
kdd99_accounts.account_id,
kdd99_accounts.frequency
HAVING
balance_after_card > balance_before_card;
```
该SQL语句会查询出所有开通了VISA信用卡的客户账户,并计算出开卡之前和开卡之后的账户余额,然后筛选出开卡之后账户余额比开卡之前高的客户账户。如果有结果,则说明客户开通信用卡之后其账户余额有提升。
阅读全文