文件名称:感知机的对偶形式.py
文件大小:2KB
文件格式:PY
更新时间:2023-09-21 05:08:30
感知机对偶形式
import numpy as np import matplotlib.pyplot as plt class PerceptronDuality(): def __init__(self): self.alpha = None self.bias = None self.W = None def fit(self, x_train, y_train, learning_rate=1, n_iters=100, plot_train=True): print("开始训练...") num_samp