Skip to content
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

adaptee.py atualizado com tipificação #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions skga/adaptee.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class Decoder:

def __init__(self, parameters, estimator, X, y, cv):
def __init__(self, parameters: dict, estimator: float, X:float, y: float, cv: dict):
self._parameters = parameters
self._estimator = estimator
self._X = X
Expand Down Expand Up @@ -157,7 +157,7 @@ def fit(self, X, y=None, *, groups=None, **fit_params):
cv_orig = check_cv(self.cv, y, classifier=is_classifier(estimator))
n_splits = cv_orig.get_n_splits(X, y, groups)

def evaluate_candidates(candidate_params, cv=None, more_results=None):
def evaluate_candidates(candidate_params: float, cv=None, more_results=None):
start = datetime.now()
candidate_params = list(candidate_params)
all_candidate_params = []
Expand Down Expand Up @@ -217,5 +217,5 @@ def evaluate_candidates(candidate_params, cv=None, more_results=None):

return self

def _run_search(self, evaluate_candidates):
def _run_search(self, evaluate_candidates: bool):
evaluate_candidates(ParameterGrid(self._parameters))