Overflow in exp in scipy/numpy in Python?

前端 未结 5 1699
谎友^
谎友^ 2021-02-05 04:45

What does the following error:

Warning: overflow encountered in exp

in scipy/numpy using Python generally mean? I\'m computing a ratio in log

5条回答
  •  粉色の甜心
    2021-02-05 05:10

    I think you can use this method to solve this problem:

    Normalized

    I overcome the problem in this method. Before using this method, the accuracy my classify is :86%. After using this method, the accuracy of my classify is :96%!!! It's great!
    first:
    Min-Max scaling

    second:
    Z-score standardization

    These are common methods to implement normalization.
    I use the first method. And I alter it. The maximum number is divided by 10. So the maximum number of the result is 10. Then exp(-10) will be not overflow!
    I hope my answer will help you !(^_^)

提交回复
热议问题