上传者: 38575421
|
上传时间: 2021-11-02 13:33:28
|
文件大小: 102KB
|
文件类型: -
本文采用的训练方法是牛顿法(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