• 2022-06-09
    这是逻辑回归实战中的损失函数模块程序,请问“填空”处应该填什么? def cost(X, y, theta): left = np.multiply(-y, np.log(model(X, theta))) right = np.multiply(1 - y, np.log(1 - model(X, theta))) return np.sum(left - right) / ( “填空”)