module benchhelper.grid_benchmark
¶
Short summary¶
module pyquickhelper.benchhelper.grid_benchmark
Grid benchmark.
Classes¶
class |
truncated documentation |
---|---|
Compares a couple of machine learning models. |
Properties¶
property |
truncated documentation |
---|---|
|
Returns the metrics. |
|
Returns images of graphs. |
|
Returns the metrics. |
|
Returns the metrics. |
|
Returns the name of the benchmark. |
Methods¶
method |
truncated documentation |
---|---|
Runs an experiment multiple times, parameter di is the dataset to use. |
|
function to overload |
|
Skips it. |
|
initialisation |
|
function to overload |
|
Splits the dataset into train and test. |
|
Runs the benchmark. |
Documentation¶
Grid benchmark.
- class pyquickhelper.benchhelper.grid_benchmark.GridBenchMark(name, datasets, clog=None, fLOG=<function noLOG>, path_to_images='.', cache_file=None, repetition=1, progressbar=None, **params)[source]¶
Bases:
BenchMark
Compares a couple of machine learning models.
- Parameters:
name – name of the test
datasets – list of dictionary of dataframes
clog – see
CustomLog
or stringfLOG – logging function
params – extra parameters
path_to_images – path to images
cache_file – cache file
repetition – repetition of the experiment (to get confidence interval)
progressbar – relies on tqdm, example tnrange
If cache_file is specified, the class will store the results of the method
bench
. On a second run, the function load the cache and run modified or new run (in param_list).datasets should be a dictionary with dataframes a values with the following keys:
'X'
: features'Y'
: labels (optional)
- __init__(name, datasets, clog=None, fLOG=<function noLOG>, path_to_images='.', cache_file=None, repetition=1, progressbar=None, **params)[source]¶
- Parameters:
name – name of the test
datasets – list of dictionary of dataframes
clog – see
CustomLog
or stringfLOG – logging function
params – extra parameters
path_to_images – path to images
cache_file – cache file
repetition – repetition of the experiment (to get confidence interval)
progressbar – relies on tqdm, example tnrange
If cache_file is specified, the class will store the results of the method
bench
. On a second run, the function load the cache and run modified or new run (in param_list).datasets should be a dictionary with dataframes a values with the following keys:
'X'
: features'Y'
: labels (optional)
- bench_experiment(info, **params)[source]¶
function to overload
- Parameters:
info – dictionary with at least key
'X'
params – additional parameters
- Returns:
output of the experiment
- predict_score_experiment(info, output, **params)[source]¶
function to overload
- Parameters:
info – dictionary with at least key
'X'
output – output of the benchmar
params – additional parameters
- Returns:
output of the experiment, tuple of dictionaries
- preprocess_dataset(dsi, **params)[source]¶
Splits the dataset into train and test.
- Parameters:
dsi – dataset index
params – additional parameters
- Returns:
list of (dataset (like info), dictionary for metrics, parameters)