公共的抽象基类
import numpy as np
from abc import ABCMeta, abstractmethod
class LinearModel(metaclass=ABCMeta):
"""
Abstract base class of Linear Model.
"""
def __init__(self):
# Before fit or predict, please transform samples' mean to 0, var to 1.
self.scaler = StandardScaler()
@abstractmethod
Section I: Brief Introduction on Three Regression Models
Regulation is one approach to tackle the problem of overfitting by adding additional information, and thereby shrinking the parameter values of the model to induce a penalty against complexity. The most popular approaches to regularized linear