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='140477735303568'>, '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 – Test for changes with these indices of Y. If not provided, all series in Y will be used as test indices
  • estimator – dictionary containing estimation model from scikit-learn used to fit and predict timeseries and, optionally, a dict of options for the estimation model fit method (default: {'object': Lasso(alpha=20), 'fit': {}})
  • consecutive – Consecutive observations to trigger change
  • threshold – Test statistic threshold for change
  • min_obs – Minimum observations in model
  • min_rmse – Minimum RMSE for models during testing
  • retrain_time – Number of days between model fit updates during monitoring period
  • screening – Style of prescreening of the timeseries for noise. Options are ‘RLM’ or ‘LOWESS’ (default: RLM)
  • screening_crit – critical value for multitemporal noise screening (default: 400.0)
  • remove_noise – Remove observation if change is not detected but first observation is above threshold (if it looks like noise) (default: True)
  • green_band – Index of green band in Y for multitemporal masking (default: 1)
  • swir1_band – Index of first SWIR band in Y for multitemporal masking (default: 4)
  • dynamic_rmse – Vary RMSE as a function of day of year (default: False)
  • slope_test – 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 – if slope_test is enabled, provide index of X containing slope term (default: 1)

Algorithm Logic

digraph G { label = "Algorithm Flowchart:\nCCDCesque" compound=true; newrank=true; ratio=1.5; /*ranksep=1.0;*/ preprocess [label="preprocess" shape="box"]; fit [label="fit" shape="box"] while [label="while\n(has observations)"]; trained [label="Segment\ninitialized?"]; end [label="Iterate\nforward"]; # Training clean [label="Multitemp mask" shape="box"]; stable [label="Test\nStability"]; is_stable [label="Stable:\ninit segment"] is_unstable [label="Unstable:\nmove forward"] # Monitoring monitor [label="Check next\nobservations"]; noise [label="Delete noise"] change [label="Change:\nnew segment"] nochange [label="No change"] { rank=min; preprocess; fit; while; } { rank=same; trained; } { rank=same; clean; monitor; } { rank=max; end; } preprocess -> fit -> while -> trained; trained -> clean [label="No" lhead=cluster0]; trained -> monitor [label="Yes" lhead=cluster1]; subgraph cluster0 { label="Historic Period"; clean -> stable; stable -> is_stable [label="Yes"]; stable -> is_unstable [label="No"]; } subgraph cluster1 { label="Monitoring Period" monitor -> noise [label="Noise\ndetected"]; monitor -> change [label="Above\nthreshold"]; monitor -> nochange [label="Within\nthreshold"]; } noise -> end [ltail=cluster1]; change -> end [ltail=cluster1]; nochange -> end [ltail=cluster1]; is_stable -> end [ltail=cluster0]; is_unstable -> end [ltail=cluster0]; end -> while; }

[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.