问题描述
我有一个LSTM编码器/解码器模型,该模型是根据Jump-Diffusion模型(本质上是二进制分类问题)对价格变动进行分类而开发的。
我的模型在训练和验证之间分为75/25。
我的问题是,在应用了诸如SMOTE之类的不平衡技术之后,我的模型在训练和验证中的预测准确性都很高(可能仍然过拟合)。但是,在准确性,召回率和f1分数方面,我的训练模型再次表现良好,但在验证方面,我的准确性和召回率却明显下降。显然,这会导致验证方面的f1得分较低。
有人知道为什么验证准确性很高,但准确性和召回率却大大下降了吗?这是我的模型在验证方面计算精度和召回率的方式是否有问题,还是我的模型过拟合导致验证结果较低?
有关模型结果的摘要,请参见下图,如果需要,我也可以提供笔记本。
server {
listen 90;
server_name <server ip or hostname>;
charset utf-8;
root /var/www/html/laravel/public;
add_header x-frame-options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.PHP index.html index.htm;
# Always serve index.html for any request
location /api {
try_files $uri $uri/ /index.PHP?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.PHP;
location ~ \.PHP$ {
fastcgi_pass unix:/var/run/PHP/PHP7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-kNown).* {
deny all;
}
error_log /var/log/Nginx/laravel-app-error.log;
access_log /var/log/Nginx/laravel-app-access.log;
}
欢迎任何建议。
谢谢。
解决方法
如果您能提供一个混淆矩阵,可能会更好。
但是,计算似乎有问题。
从数学上讲,**(准确性+召回率==精度)
编辑: mathematical identity在这里。
您的情况是31 + 33
我建议您使用this function。并获取报告,如果您能在问题中打印输出,我将不胜感激。