API documentation

Subpackages

core.easy_experiment module

core.easy_experiment.easy_experiment(source, target_test, target_retrain=None, domain_adaptive=False, models='all', binary_evaluation=True, evaluation_metrics='all', thread_num=4, remove_time=True, plot=False)[source]

A function for researcher to fast test all models on one dataset and evaluate by all metrics

Parameters
  • source (core.data.dataset.Dataset) – the source domain with full knowledge for training the model

  • target_retrain (None or core.data.dataset.Dataset) – the labelled ground truth Dataset in the target domain for re-training the model

  • target_test (core.data.dataset.Dataset) – the Dataset in the rest of the target domain for testing by using sensor data only

  • domain_adaptive (bool) – indicate whether use normal supervised learning model or domain-adaptive semi-supervised learning model

  • binary_evaluation (bool) – indicate whether use binary evaluation metrics or occupancy count metrics

  • models (str, list(str)) – choose the models want to use in this experiment. If 'all' then all model with selected superclass will add to the experiment.

  • evaluation_metrics (str, list(str)) – choose the evaluation metrics want to use in this experiment. If 'all' then all metrics with selected superclass will add to the experiment.

  • thread_num (int) – the maximum number of threads can use to speed up

  • remove_time (bool) – decide whether remove the time column when predicting occupancy level

Return type

list(dict(str, dict(str, score)), dict(str, numpy.ndarray))

Returns

first is the final score of the metrics by all models, and second is the prediction result

core.easy_experiment.easy_set_experiment(source_set, target_test_set=None, split_percentage=0.8, target_retrain=None, domain_adaptive=False, models='all', binary_evaluation=True, evaluation_metrics='all', thread_num=4, remove_time=True, plot=False)[source]

A function for researcher to fast test all models on all dataset and evaluate by all metrics. Please make sure all keys in source_set, target_test_set, and target_retrain are the same

Parameters
  • source_set (dict(str, core.data.dataset.Dataset)) – the set of source domain with full knowledge for training the model

  • target_retrain (None or dict(str, core.data.dataset.Dataset)) – the labelled ground truth Dataset in the target domain for re-training the model

  • target_test_set (dict(str, core.data.dataset.Dataset)) – the set of Datasets in the rest of the target domain for testing by using sensor data only. If None then split source domain to get new source domain and target domain

  • split_percentage (float) – percentage of the row in the first part

  • domain_adaptive (bool) – indicate whether use normal supervised learning model or domain-adaptive semi-supervised learning model

  • binary_evaluation (bool) – indicate whether use binary evaluation metrics or occupancy count metrics

  • models (str, list(str)) – choose the models want to use in this experiment. If 'all' then all model with selected superclass will add to the experiment.

  • evaluation_metrics (str, list(str)) – choose the evaluation metrics want to use in this experiment. If 'all' then all metrics with selected superclass will add to the experiment.

  • thread_num (int) – the maximum number of threads can use to speed up

  • remove_time (bool) – decide whether remove the time column when predicting occupancy level

  • plot (bool) – unused

Return type

list(dict(str, dict(str, dict(str, score))), dict(str, dict(str, numpy.ndarray)))

Returns

first is the final score of the metrics by all Datasets, all models, and second is the prediction result