Source: triage/experiments/multicore.py#L0
insert_into_table(insert_statements, feature_generator_factory, db_connection_string)
build_matrix(build_tasks, planner_factory, db_connection_string)
train_model(train_tasks, trainer_factory, db_connection_string)
test_and_evaluate(model_ids, predictor_factory, evaluator_factory, indiv_importance_factory, \
test_store, db_connection_string, split_def, train_matrix_columns, config)
The Base class for all Experiments.
All 'as of times' in experiment config
Used for label and feature generation.
Returns: (list) of datetimes
All train and test label windows
Returns: (list) label windows, in string form as they appeared in the experiment config
collate Aggregation objects used by this experiment.
Returns: (list) of collate.Aggregation objects
Feature dictionaries, representing the feature tables and columns configured in this experiment after computing feature groups.
Returns: (list) of dicts, keys being feature table names and values being lists of feature names
All feature table query tasks specified by this Experiment
Returns: (dict) keys are group table names, values are themselves dicts, each with keys for different stages of table creation (prepare, inserts, finalize) and with values being lists of SQL commands
Full matrix definitions
Returns: (list) temporal and feature information for each matrix
All possible features found in the database. Not all features will necessarily end up in matrices
Returns: (list) of dicts, keys being feature table names and values being lists of feature names
Tasks for all matrices that need to be built as a part of this Experiment.
Each task contains arguments understood by Architect.build_matrix
Returns: (list) of dicts
Temporal splits based on the experiment's configuration
Returns: (dict) temporal splits
Example:
{
'beginning_of_time': {datetime},
'modeling_start_time': {datetime},
'modeling_end_time': {datetime},
'train_matrix': {
'matrix_start_time': {datetime},
'matrix_end_time': {datetime},
'as_of_times': [list of {datetime}s]
},
'test_matrices': [list of matrix defs similar to train_matrix]
}
__init__(self, n_processes=1, n_db_processes=1, *args, **kwargs)
Initialize self. See help(type(self)) for accurate signature.
build_matrices(self)
Generate labels, features, and matrices
catwalk(self)
Train, test, and evaluate models
parallelize(self, partially_bound_function, tasks, n_processes, chunksize=1)
parallelize_with_success_count(self, partially_bound_function, tasks, n_processes, chunksize=1)