CCDCesque¶
The YATSM implementation of Continuous Classification and Change Detection (CCDC) [1]
-
class
yatsm.algorithms.ccdc.
CCDCesque
(test_indices=None, estimator={'object': <MagicMock name='mock.linear_model.Lasso()' id='139631632731920'>, 'fit': {}}, consecutive=5, threshold=2.56, min_obs=None, min_rmse=None, retrain_time=365.25, screening='RLM', screening_crit=400.0, remove_noise=True, green_band=1, swir1_band=4, dynamic_rmse=False, slope_test=False, idx_slope=1, **kwargs)[source]¶ Initialize a CCDC-like model for data X (spectra) and Y (dates)
An unofficial and unvalidated port of the Continuous Change Detection and Classification (CCDC) algorithm by Zhu and Woodcock, 2014.
Parameters: - test_indices (numpy.ndarray) – Test for changes with these
indices of
Y
. If not provided, all series inY
will be used as test indices - estimator (dict) – dictionary containing estimation model from
scikit-learn
used to fit and predict timeseries and, optionally, a dict of options for the estimation modelfit
method (default:{'object': Lasso(alpha=20), 'fit': {}}
) - consecutive (int) – Consecutive observations to trigger change
- threshold (float) – Test statistic threshold for change
- min_obs (int) – Minimum observations in model
- min_rmse (float) – Minimum RMSE for models during testing
- retrain_time (float) – Number of days between model fit updates during monitoring period
- screening (str) – Style of prescreening of the timeseries for noise. Options are ‘RLM’ or ‘LOWESS’ (default: RLM)
- screening_crit (float) – critical value for multitemporal noise screening (default: 400.0)
- remove_noise (bool) – Remove observation if change is not detected but first observation is above threshold (if it looks like noise) (default: True)
- green_band (int) – Index of green band in
Y
for multitemporal masking (default: 1) - swir1_band (int) – Index of first SWIR band in
Y
for multitemporal masking (default: 4) - dynamic_rmse (bool) – Vary RMSE as a function of day of year (default: False)
- slope_test (float or bool) – Use an additional slope test to assess the suitability of the training period. A value of True enables the test and uses the threshold parameter as the test criterion. False turns off the test or a float value enables the test but overrides the test criterion threshold. (default: False)
- idx_slope (int) – if
slope_test
is enabled, provide index ofX
containing slope term (default: 1)
-
_get_dynamic_rmse
()[source]¶ Return the dynamic RMSE for each model
Dynamic RMSE refers to the Root Mean Squared Error calculated using self.min_obs number of observations closest in day of year to the observation self.consecutive steps into the future. Goal is to reduce false-positives during seasonal transitions (high variance in the signal) while decreasing omission during stable times of year.
Returns: dynamic RMSE of each tested model Return type: numpy.ndarray
-
_get_model_rmse
()[source]¶ Return the normal RMSE of each fitted model
Returns: RMSE of each tested model Return type: numpy.ndarray
- test_indices (numpy.ndarray) – Test for changes with these
indices of
Algorithm Logic¶
[1] | Zhe Zhu and Curtis E. Woodcock. Continuous change detection and classification of land cover using all available landsat data. Remote Sensing of Environment, 144(0):152 – 171, 2014. URL: http://www.sciencedirect.com/science/article/pii/S0034425714000248, doi:http://dx.doi.org/10.1016/j.rse.2014.01.011. |