Error while using scipy.optimize:— Type Error: costFuncReg() missing 1 required positional argument: 'lambda_'

前端 未结 0 758
礼貌的吻别
礼貌的吻别 2021-01-17 03:06
def costFuncReg(theta, X,y, lambda_):
m = y.size
J = 0
grad = np.zeros(theta.shape)
h = sigmoid(X.dot(theta.T))

temp = theta
temp[0] = 0

J = (1/m)*np.sum(-y.dot(np         


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