python 牛顿法实现逻辑回归(Logistic Regression)
本文采用的训练方法是牛顿法(Newton Method)。 代码 import numpy as np class LogisticRegression(object): """ Logistic Regression Classifier training by Newton Method """ def __init__(self, error: float = 0.7, max_epoch: int = 100): """ :param error: float, if the distance between new weight and old weig
用户评论