yatsm.mapping.classification module¶
Functions relevant for mapping categorical classification labels
-
yatsm.mapping.classification.
get_classification
(date, result_location, image_ds, after=False, before=False, qa=False, pred_proba=False, ndv=0, pattern='yatsm_r*', warn_on_empty=False)[source]¶ Output raster with classification results
Parameters: - date (int) – ordinal date for prediction image
- result_location (str) – Location of the results
- image_ds (gdal.Dataset) – Example dataset
- after (bool, optional) – If date intersects a disturbed period, use next available time segment
- before (bool, optional) – If date does not intersect a model, use previous non-disturbed time segment
- qa (bool, optional) – Add QA flag specifying segment type (intersect, after, or before)
- pred_proba (bool, optional) – Include additional band with classification value probabilities
- ndv (int, optional) – NoDataValue
- pattern (str, optional) – filename pattern of saved record results
- warn_on_empty (bool, optional) – Log warning if result contained no result records (default: False)
Returns: - 2D numpy array containing the classification map for the
date specified
Return type: np.ndarray