1. 首页
  2. 数据库
  3. 其它
  4. python 牛顿法实现逻辑回归(Logistic Regression)

python 牛顿法实现逻辑回归(Logistic Regression)

上传者: 2020-12-22 04:09:19上传 PDF文件 102.15KB 热度 37次
本文采用的训练方法是牛顿法(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
用户评论