You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

R2值低但MAPE高?ANN回归模型指标异常原因咨询

Why Your ANN's Regression Metrics Are Conflicting

Hey there, let's unpack this confusing result with your ANN model. First, a quick correction: when you mention the "MAPE corresponding accuracy is surprisingly high," that’s likely a small mix-up. Looking at your code, accuracy = 100 - mape—so with an 88.73% MAPE, your ANN’s actual accuracy is 11.27%, which is way lower than the ~21% accuracy your decision tree, bagging, and random forest models are getting. What you’re probably puzzled by is: why does the ANN have a far worse R² and RMSE, but also a much higher (worse) MAPE than the tree-based models?

Here are the key reasons behind this discrepancy:

1. Each Metric Measures Something Totally Different

Regression metrics prioritize different aspects of your model’s performance, which leads to conflicting results when your model fails in specific ways:

  • R² Score: Tracks how much of the data’s overall variance your model explains. It’s sensitive to how well the model fits the entire dataset—if your ANN is off-target across most samples, the R² will plummet quickly.
  • RMSE: Penalizes large errors heavily (thanks to squaring the error values). A handful of samples with huge absolute errors will blow up your RMSE, even if most predictions are decent.
  • MAPE: Calculates the average of |prediction - true value| / true value as a percentage. This metric’s biggest quirk is that it’s hyper-sensitive to samples with small true values. Even a tiny absolute error becomes massive in percentage terms when the true value is close to zero, and those outliers can skew the entire MAPE result.

2. Small True-Value Samples Are Likely the Culprit

The most probable cause here is that your test set has some samples where the true label is very small. Let’s say you have a sample with a true value of 1:

  • If your ANN predicts 10, that’s an absolute error of 9, which translates to a 900% percentage error.
  • Your random forest might predict 2, an absolute error of 1 (100% percentage error).

That single small-value sample would jack up your ANN’s MAPE dramatically, while the impact on RMSE (9² vs. 1²) and R² (which looks at overall variance) would be noticeable but not as extreme as the MAPE swing. Tree-based models often handle small-value samples better because they split data based on feature thresholds, which can capture edge cases more reliably than an untuned ANN.

3. Your ANN Might Be Misconfigured

Don’t rule out issues with how you’re training the ANN either:

  • Did you forget to normalize/standardize your data? ANNs are notoriously sensitive to feature and label scales. If your features have wildly different ranges, the model might struggle to converge to a good fit, leading to poor R² and RMSE across the board.
  • Is your model structure off? Too few neurons/layers mean underfitting (can’t capture patterns), too many mean overfitting (performs well on training data but bombs on test).
  • Training parameters: A learning rate that’s too high can make the model oscillate instead of converging, or not training for enough epochs could leave the model underdeveloped.

How to Verify This

Try these quick checks to confirm the root cause:

  • Pull out the test samples with the smallest true values (top 10% smallest) and compare the ANN’s predictions vs. other models’ on these samples. You’ll almost certainly see the percentage errors here are driving the high MAPE.
  • Recalculate MAPE after excluding samples where the true value is near zero, or use a weighted MAPE that downweights extreme percentage errors. This should make the MAPE align more closely with R² and RMSE.
  • Plot your ANN’s training loss curve. If it’s still decreasing at the end of training, you need more epochs; if it’s low on training but high on test, you’re overfitting.

内容的提问来源于stack exchange,提问作者Tanuj Chakraborty

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 20:37:40