RuntimeWarning: divide by zero encountered in log in while using gradient descent in logistic regression

后端 未结 0 1728
粉色の甜心
粉色の甜心 2021-02-15 03:16

i don\'t know how to fix this I am just a beginner. below is the code


def sigmoid(X, theta):

    z = np.dot(X, theta[1:]) + theta[0]
    y =expit(1/1+np.exp(-z)         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题