公共的抽象基类importnumpyasnpfromabcimportABCMeta,abstractmethodclassLinearModel(metaclass=ABCMeta):"""AbstractbaseclassofLinearModel."""def__init__(self):#Beforefitorpredict,pleasetransformsamples'meanto0,varto1.self.scaler=StandardScaler()@abstractmethoddeffit(self,X,y):"""fitfunc"""defpredict(self,X):#beforepredict,youmustrun...
继续阅读 >