You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""The summary line for a class docstring should fit on one line.
88
-
89
-
If the class has public attributes, they may be documented here
90
-
in an ``Attributes`` section and follow the same formatting as a
91
-
function's ``Args`` section. Alternatively, attributes may be documented
92
-
inline with the attribute's declaration (see __init__ method below).
93
-
94
-
Properties created with the ``@property`` decorator should be documented
95
-
in the property's getter method.
96
-
97
-
Attributes:
98
-
attr1 (str): Description of `attr1`.
99
-
attr2 (:obj:`int`, optional): Description of `attr2`.
100
-
87
+
"""Mapping between the features that are to be input into a particular prediction strategy, and the features that should be output (predicted) by that strategy.
88
+
89
+
Taken together, the input features, output features, and predictor template constitute a prediction strategy.
"""The summary line for a class docstring should fit on one line.
265
-
266
-
If the class has public attributes, they may be documented here
267
-
in an ``Attributes`` section and follow the same formatting as a
268
-
function's ``Args`` section. Alternatively, attributes may be documented
269
-
inline with the attribute's declaration (see __init__ method below).
270
-
271
-
Properties created with the ``@property`` decorator should be documented
272
-
in the property's getter method.
273
-
274
-
Attributes:
275
-
attr1 (str): Description of `attr1`.
276
-
attr2 (:obj:`int`, optional): Description of `attr2`.
239
+
"""Estimates the generalisation errors of multiple configured prediction strategies on the same dataset, for the same prediction timestamps, and on the exact same cross-validated splits.
277
240
241
+
The steps to take are: initialise this object with the common dataset and prediction times, then call `add_to_targets` to configure the prediction strategies to be used. Finally, call `evaluate`, which will conduct the (long-running) evaluation procedure, which will return some results upon completion. Results are also cached internally, and can be retrieved or charted using the helper functions.
278
242
"""
279
243
# The constructor takes in fields that are common to all targets: the data container + prediction times
280
244
def__init__(self, data, prediction_times):
245
+
"""Constructor.
246
+
247
+
Args:
248
+
data: The common `MultiSeries` data container.
249
+
prediction_times: The common collection of prediction times.
"""Class methods are similar to regular functions.
260
+
"""Expand the arguments (using a Cartesian join) into a collection of `Target` objects, and cache those `Target` objects, ready to be used for the `evaluate` function.
261
+
262
+
The method can be called multiple times: when that happens, it will append to the collection of targets, overwrite it.
290
263
264
+
This is really just a shorthand way of initialising multiple `Target` objects and adding them to the `targets` attribute of this object.
265
+
291
266
Args:
292
-
param1: The first parameter.
293
-
param2: The second parameter.
294
-
295
-
Returns:
296
-
True if successful, False otherwise.
267
+
predictor_templates: A list of predictors that should be Cartesian-joined with the other lists of parameters to define multiple targets for evaluation.
268
+
combos_of_input_time_column: A list of boolean values that should be Cartesian-joined with the other lists of parameters to define multiple targets for evaluation.
269
+
combos_of_input_value_colnames: A list of string field names that should be Cartesian-joined with the other lists of parameters to define multiple targets for evaluation.
270
+
combos_of_output_value_colnames: A list of string field names that should be Cartesian-joined with the other lists of parameters to define multiple targets for evaluation.
"""Class methods are similar to regular functions.
291
+
"""Run the evaluation. Unless a specific `series_splitter` override is provided, this will be a 5-fold cross validation. Depending on the size of the dataset, time to train predictors, number of targets and number of folds, this may take a long time!
318
292
319
293
Args:
320
-
param1: The first parameter.
321
-
param2: The second parameter.
294
+
series_splitter: If supplied by the user, this object be used instead of `sklearn.model_selection.KFold(n_splits=5)` to produce the folds used for the generalisation error estimation procedure.
295
+
chart_intermediate_results: If set to True by the user, this method will produce charts after each fold.
322
296
323
297
Returns:
324
-
True if successful, False otherwise.
298
+
A pandas dataframe containing overall (i.e. aggregated over timestamps) estimated generalisation errors.
"""Class methods are similar to regular functions.
413
+
"""TODO
448
414
449
415
Args:
450
-
param1: The first parameter.
451
-
param2: The second parameter.
452
-
416
+
feature_name: Name of the output/prediction feature that we would like to see the performance on.
417
+
metric: Type of error metric that we would like to chart; 'rmse' by default.
418
+
best_n_results: If an integer is supplied, only the results of the `best_n_results` top-performing prediction strategies will be charted; otherwise all will be charted (by default).
419
+
453
420
Returns:
454
-
True if successful, False otherwise.
421
+
A pandas dataframe containing a copy of the results.
"""Class methods are similar to regular functions.
431
+
"""TODO
465
432
466
433
Args:
467
-
param1: The first parameter.
468
-
param2: The second parameter.
469
-
470
-
Returns:
471
-
True if successful, False otherwise.
472
-
434
+
feature_name: Name of the output/prediction feature that we would like to see the performance on.
435
+
metric: Type of error metric that we would like to chart; 'rmse' by default.
436
+
best_n_results: If an integer is supplied, only the results of the `best_n_results` top-performing prediction strategies will be charted; otherwise all will be charted (by default).
437
+
stderr_bar_multiple: Error bars will be drawn for the given multiple of standard error (1 by default).
438
+
errorevery: If a value is supplied, deterministically sample the error bars, displaying each `errorevery` error bar. This does not affect the number of points displayed, just the number of error bars.
439
+
func_update_description_strings: If a function name is specified, this function will be called on each feature name and the results used in the display. By default, none is supplied.
"""Class methods are similar to regular functions.
479
+
"""TODO
513
480
514
481
Args:
515
-
param1: The first parameter.
516
-
param2: The second parameter.
517
-
518
-
Returns:
519
-
True if successful, False otherwise.
520
-
482
+
feature_name: Name of the output/prediction feature that we would like to see the performance on.
483
+
metric: Type of error metric that we would like to chart; 'rmse' by default.
484
+
best_n_overall_results: If an integer is supplied, only the results of the `best_n_overall_results` top-performing prediction strategies will be charted; otherwise all will be charted (by default).
485
+
stderr_bar_multiple: Error bars will be drawn for the given multiple of standard error (1 by default).
486
+
errorevery: If a value is supplied, deterministically sample the error bars, displaying each `errorevery` error bar. This does not affect the number of points displayed, just the number of error bars.
487
+
func_update_description_strings: If a function name is specified, this function will be called on each feature name and the results used in the display. By default, none is supplied.
"""Class methods are similar to regular functions.
597
+
"""Write out top-level and intermediate results as CSV files, under a fixed directory structure.
627
598
628
599
Args:
629
-
param1: The first parameter.
630
-
param2: The second parameter.
631
-
632
-
Returns:
633
-
True if successful, False otherwise.
634
-
600
+
parent_dirpath: Path to the directory in which multiple subdirectories and CSV files will be created. If this parent directory does not exist, it will be created.
0 commit comments