skdatasets.utils.scores.scores_table¶
- skdatasets.utils.scores.scores_table(scores: np.typing.ArrayLike, stds: np.typing.ArrayLike | None = None, *, datasets: Sequence[str], estimators: Sequence[str], nobs: int | None = None, greater_is_better: bool = True, method: Literal['average', 'min', 'max', 'dense', 'ordinal'] = 'min', significancy_level: float = 0, paired_test: bool = False, two_sided: bool = True, default_style: Literal['html', 'latex', None] = 'html', precision: int = 2, summary_rows: Sequence[Tuple[str, Callable[..., SummaryRow]]] = (('Average rank', <function average_rank>),)) pd.io.formats.style.Styler [source]¶
Scores table.
Prints a table where each row represents a dataset and each column represents an estimator.
- Parameters:
scores (array-like) – Matrix of scores where each column represents a model. Either the full matrix with all experiment results or the matrix with the mean scores can be passed.
stds (array-like, default=None) – Matrix of standard deviations where each column represents a model. If
scores
is the full matrix with all results this is automatically computed from it and should not be passed.datasets (sequence of
str
) – List of dataset names.estimators (sequence of
str
) – List of estimator names.nobs (
int
) – Number of repetitions of the experiments. Used only for computing significances whenscores
is not the full matrix.greater_is_better (boolean, default=True) – Whether a greater score is better (score) or worse (loss).
method ({'average', 'min', 'max', 'dense', 'ordinal'}, default='average') – Method used to solve ties.
significancy_level (
float
, default=0) – Significancy level for considerin a result significant. If nonzero, significancy is calculated using a t-test. In that case, ifpaired_test
isTrue
,scores
should be the full matrix and a paired test is performed. Otherwise, the t-test assumes independence, and eitherscores
should be the full matrix ornobs
should be passed.paired_test (
bool
, default=False) – Whether to perform a paired test or a test assuming independence. IfTrue
,scores
should be the full matrix. Otherwise, eitherscores
should be the full matrix ornobs
should be passed.two_sided (
bool
, default=True) – Whether to perform a two sided t-test or a one sided t-test.default_style ({'html', 'latex', None}, default='html') – Default style for the table. Use
None
for no style. Note that the CSS classes and textual formatting are always set.precision (
int
) – Number of decimals used for floating point numbers.summary_rows (sequence) – List of (name, callable) tuples for additional summary rows. By default, the rank average is computed.
- Returns:
table – Table of mean and standard deviation of each estimator-dataset pair. A ranking of estimators is also generated.
- Return type:
array-like