Skip to content

Allow the computation of LOO-CV error for OrdinaryRegression to be optional

Damar Wicaksono requested to merge dev-94 into dev

The computation of LOO-CV error for ordinary regression may become costly for a certain size of problem. A flag (a keyword argument 'compute_loocv') is now allowed to be passed to the fit() method so the computation can be skipped. The parameter does not explicitly appear in the method signature; instead it passes through the **kwargs mechanism which is then parsed in the method's body.

Now, for instance:

...
>>> my_ordinaryreg.fit(xx_train, yy_train, compute_loocv=False)
>>> my_ordinaryreg.loocv_error is None
True

By default the flag is still set to True.

This MR should resolve Issue #94 (closed).

Edited by Damar Wicaksono

Merge request reports

Loading