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

后端 未结 0 1539
迷失自我
迷失自我 2021-02-15 02:46

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)         


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