Writers¶
-
writers.
write_classifier_space
(fpath, clf_name, best_params=None)[source]¶ Creates a csv file containing the chosen classifier’s name as well as the hyperparameters space to be searched. If best_params is given, then the csv will present the finetuned hyperparameters values instead.
- Parameters
fpath (str) – File path to write
clf_name (str) – Name of the utilized classifier
best_params (dict, optional) – Contains hyperparameters names as keys and the corresponding finetuned values as values
- Returns
None
-
writers.
write_evaluation_results
(results_path, results_dict)[source]¶ Creates three csv files that present (a) full results (b) results per fold and (c) results per classifier of the algorithm_selection step.
- Parameters
results_path (str) – Path to write
results_dict (dict) – Contains the algorithm_selection step’s results
- Returns
None
-
writers.
write_evaluation_space
(fpath)[source]¶ Creates a csv file that contains all the included classifiers as well as the hyperparameters space to be searched for each of them.
- Parameters
fpath (str) – File path to write
- Returns
None
-
writers.
write_feature_params_info
(fpath, params_names, params_vals)[source]¶ Creates a csv file defining the features parameters used in each of the features sets.
- Parameters
fpath (str) – File path to write
params_names (list) – Contains the features parameters names
params_vals (list) – Contains a list with values for each feature parameter
- Returns
None
-
writers.
write_feature_space
(fpath, features_info=None, best_params=None)[source]¶ Creates a csv file containing the features configuration to be searched (namely included features as well as their parameters to be finetuned and whether normalizaton should be used or not). If best_params is given, then the csv will present the finetuned features parameters values instead.
- Parameters
fpath (str) – File path to write
features_info (list, optional) – Contains (features, normalized or not) pairs
best_params (dict, optional) – Contains features as keys and the corresponding finetuned values as values
- Returns
None
-
writers.
write_finetuning_results
(results_path, results_dict)[source]¶ Creates two csv files that present (a) full results and (b) results per feature set and classifier hyperparameters used of the model_selection step.
- Parameters
results_path (str) – Path to write
results_dict (dict) – Contains the model_selection step’s results
- Returns
None
-
writers.
write_predictions
(fpath, poi_gdf, k_preds)[source]¶ Creates a csv file to present the top k predictions (in (predicted label, score) pairs).
- Parameters
fpath (str) – File path to write
poi_gdf (geopandas.GeoDataFrame) – Contains the pois to which the predictions refer to
k_preds (list) – Contains (predicted label, score) pairs
- Returns
None