Evaluators
siapy.utils.evaluators
¶
ScorerFuncType
module-attribute
¶
ScorerFuncType = Callable[[BaseEstimator, ArrayLike2dType, ArrayLike1dType], float]
cross_validation
¶
cross_validation(model: BaseEstimator, X: ArrayLike2dType, y: ArrayLike1dType, X_val: ArrayLike2dType | None = None, y_val: ArrayLike1dType | None = None, *, groups: ArrayLike1dType | None = None, scoring: str | ScorerFuncType | None = None, cv: int | BaseCrossValidator | Iterable | None = None, n_jobs: int | None = 1, verbose: int = 0, fit_params: dict[str, Any] | None = None, pre_dispatch: int | str = 1, error_score: Literal['raise'] | int = 0) -> float
PARAMETER | DESCRIPTION |
---|---|
model |
TYPE:
|
X |
TYPE:
|
y |
TYPE:
|
X_val |
TYPE:
|
y_val |
TYPE:
|
groups |
TYPE:
|
scoring |
TYPE:
|
cv |
TYPE:
|
n_jobs |
TYPE:
|
verbose |
TYPE:
|
fit_params |
|
pre_dispatch |
|
error_score |
|
Source code in siapy/utils/evaluators.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
hold_out_validation
¶
hold_out_validation(model: BaseEstimator, X: ArrayLike2dType, y: ArrayLike1dType, X_val: ArrayLike2dType | None = None, y_val: ArrayLike1dType | None = None, *, scoring: str | ScorerFuncType | None = None, test_size: float | None = 0.2, random_state: int | None = None, shuffle: bool = True, stratify: ndarray | None = None) -> float
PARAMETER | DESCRIPTION |
---|---|
model |
TYPE:
|
X |
TYPE:
|
y |
TYPE:
|
X_val |
TYPE:
|
y_val |
TYPE:
|
scoring |
TYPE:
|
test_size |
TYPE:
|
random_state |
TYPE:
|
shuffle |
TYPE:
|
stratify |
TYPE:
|
Source code in siapy/utils/evaluators.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|