yatsm.cli.train module¶
Command line interface for training classifiers on YATSM output
-
yatsm.cli.train.
algo_diagnostics
(cfg, X, y, row, col, algo, n_fold, make_plots=True)[source]¶ Display algorithm diagnostics for a given X and y
Parameters: - cfg¶ – YATSM configuration dictionary
- X¶ – X feature input used in classification
- y¶ – y labeled examples
- row¶ – row pixel locations of y
- col¶ – column pixel locations of y
- algo¶ – classifier used from scikit-learn
- n_fold¶ – number of folds for crossvalidation
- make_plots¶ – show diagnostic plots (default: True)
-
yatsm.cli.train.
find_result_attributes
(cfg)[source]¶ Return result attributes relevant for training a classifier
At this time, the only relevant information is the design information,
design (OrderedDict)
anddesign_matrix (str)
Parameters: cfg¶ – YATSM configuration dictionary Returns: dictionary of result attributes Return type: dict
-
yatsm.cli.train.
get_training_inputs
(cfg, exit_on_missing=False)[source]¶ Returns X features and y labels specified in config file
Parameters: Returns: matrix of feature inputs for each training data sample y (np.ndarray): array of labeled training data samples row (np.ndarray): row pixel locations of y col (np.ndarray): column pixel locations of y labels (np.ndarraY): label of y if found, else None
Return type: X (np.ndarray)