-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add xgboost sampler #30
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==========================================
+ Coverage 97.50% 97.59% +0.08%
==========================================
Files 24 28 +4
Lines 1325 1413 +88
==========================================
+ Hits 1292 1379 +87
- Misses 33 34 +1
|
50fe69a
to
589dfb4
Compare
589dfb4
to
f51d2bf
Compare
@@ -39,7 +52,7 @@ | |||
}, | |||
{ | |||
"cell_type": "code", | |||
"execution_count": 2, | |||
"execution_count": 108, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(very picky) Could you fully execute the notebook from scratch so to make the execution count reasonable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this is a useful feature.
I wonder whether we could develop a generalized sampler based on machine learning surrogates (i.e. regressors). Something like:
class Regressor(ABC):
@abstractmethod
def fit(self, X, y):
raise NotImplementedError
@abstractmethod
def predict(x):
raise NotImplementedError
class SurrogateSampler(BaseSampler):
def __init__( # pylint: disable=too-many-arguments
self,
batch_size: int,
regressor: Regressor,
random_state: Optional[int] = None,
max_deduplication_passes: int = 5,
candidate_pool_size: Optional[int] = None):
...
self.regressor = regressor
Yes I completely agree, it's something that I also thought I would do, but I wanted to do this in a different PR |
Thank you for the review @marcofavoritobi |
Proposed changes
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply.develop
branch (left side). Also you should start your branch off ourdevelop
.