参考页上写着:
Parameters:
X : array-like or sparse matrix, shape (n_samples, n_features)
Training data
y : array_like, shape (n_samples, n_targets)
Target values. Will be cast to X’s dtype if necessaryX是外生变量吗?我假设是这样的,但是对于状态模型OLS,内源性优先,所以我想确认,因为它们产生不同的系数。
发布于 2019-06-28 16:52:20
是的,您是正确的,与statsmodel OLS模块相比,您在sklearn模块中为外生变量和内生变量提供饲料的顺序是相反的(其他模型也是这样)。
若X=外生变量Y=内生性
在滑雪课上,你会做这样的事情:
clf.fit(X,Y)然而,在状态模型中,您可以:
clf.fit(Y,X)其中clf是您要构建的模型。
https://stackoverflow.com/questions/56808719
复制相似问题