Skip to content

Commit

Permalink
PyAF 5.0 Final Touch 2: Disable alpha in ridge regressions #231. AR/A…
Browse files Browse the repository at this point in the history
…RX models use a plain lienar regression.
  • Loading branch information
antoinecarme committed Mar 18, 2023
1 parent 19ea75a commit a3b41b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyaf/TS/Scikit_Models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def fit(self):
lAREstimFrame = self.mSplit.getEstimPart(self.mARFrame)

lARInputs = lAREstimFrame[self.mInputNames].values

lARTarget = lAREstimFrame[series].values
# print(len(self.mInputNames), lARInputs.shape , lARTarget.shape)
assert(lARInputs.shape[1] > 0);
Expand Down Expand Up @@ -148,7 +149,7 @@ def dumpCoefficients(self, iMax=10):
def build_Scikit_Model(self):
import sklearn.linear_model as linear_model
# issue_22 : warning about singular matrix => change the solver by default.
self.mScikitModel = linear_model.Ridge(solver='svd')
self.mScikitModel = linear_model.Ridge(solver='svd', alpha = 0.0)

def set_name(self):
self.mOutName = self.mCycleResidueName + '_AR(' + str(self.mNbLags) + ")";
Expand Down

0 comments on commit a3b41b5

Please sign in to comment.