使用numpy写一个线性回归算法, 方程(模型)为 y = a x + b y=ax+b y=ax+b。要求自己设计训练部分并且收敛到满意效果。
以下是数据产生代码:
import matplotlib.pyplot as plt
import numpy as np
class DataGenerator:
"""
线性回归数据产生器, 方程:y = ax + b
"""
def __i
使用numpy写一个线性回归算法, 方程(模型)为 y = a x + b y=ax+b y=ax+b。要求自己设计训练部分并且收敛到满意效果。
以下是数据产生代码:
import matplotlib.pyplot as plt
import numpy as np
class DataGenerator:
"""
线性回归数据产生器, 方程:y = ax + b
"""
def __i