且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Keras/TensorFlow-高准确度,错误的预测

更新时间:2023-02-26 19:59:36

这有两个可能的问题. 1.数据偏度 2.过度拟合

There are two possible problems with this. 1. Data skewness 2. Overfitting

  1. 数据偏斜度:您的数据集数据可能偏斜,例如,它只有1%的正数,然后预测0的简单算法将具有99%的准确度.在这里,您需要使用以下指标来量化善良"

  1. Data skewness: your dataset data might be skewed, for example it has only 1% positives, then simple algorithm that predicts 0, will be 99% accurate. Here you need to use following metrics to quantify "goodness"

  • 精确度和召回力
  • f1-分数

过拟合:也称为泛化问题,从理论上讲,如果训练参数更多(您的权重和神经网络的偏见),则可能适合它的参数对训练有好处,但不能将其泛化.从理论上讲,VC限制是它的局限性,具体取决于您的训练示例(m),因此您可以尝试

Overfitting: also called generalisation problem, in theory if training parameters are more (your weights and biases of neural network) then it might fit it parameters to do good on training but can't generalise it. Theoretically VC-dimesion is the limit to it, which depends on your training example (m), So you can try

  • 增加培训数据的大小(通过增加)
  • 添加正则化
  • 使用辍学
  • 您可以查看进入,以了解神经网络中应有多少个节点
  • increasing training data size (by getting more)
  • Adding regularisation
  • Using dropout
  • you can look into, to understand how many nodes should be in neural network