-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add adaptive clipping parameter to init and test
- Loading branch information
1 parent
8fa0c10
commit af0b641
Showing
2 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (c) QuantCo 2024-2024 | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
from sklearn.linear_model import LinearRegression, LogisticRegression | ||
|
||
from metalearners.drlearner import DRLearner | ||
|
||
|
||
def test_adaptive_clipping_smoke(dummy_dataset): | ||
X, y, w = dummy_dataset | ||
ml = DRLearner( | ||
False, | ||
2, | ||
LinearRegression, | ||
LinearRegression, | ||
LogisticRegression, | ||
n_folds=2, | ||
adaptive_clipping=True, | ||
) | ||
ml.fit(X, y, w) |