The CCDC algorithm records its results as "attributes" of each time series
segment found during each pixel's record. These "attributes" are stored in
the original MATLAB code as an array of structures, with each pixel ran
having at least one segment or more than one if there was a break detected.
As each task running the MATLAB implementation finishes a pixel in a line,
the "record of change" (rec_cg) from this pixel is appended to the existing
array of structures. In Python, NumPy has an equivalent data structure in the
"structured array".
The attributes to store for each segment are:
pos: position- Currently recorded as a “unraveled” 2d array reference (col + row * ncol), but you could also record “x” and “y” in pixel positions or projected coordinates
t_start: start date of segmentt_end: end date of segmentt_break: break date of segment (0 is NA value for no break detected)coefs: coefficient for models of segments- (
pfeatures acrossnbands, usually taken as 8 coefficients by 7 bands)
- (
rmse: RMSE of model segments- per
nbands, usually 7
- per
magnitude: magnitude of change- per
n, usually 7, where 0.0 is the NA value for no break detected
- per
change_prob: Probability of change- Metric describing how many observations at the end of a segment looked like change
- Recorded as 1 if there is a change detected and confirmed
- Recorded as a fraction for segments ending at the end of a time series record
- See: TrendSeasonalFit_v12_30ARDLine.m:823
category: QA/QC value describing the type of CCDC model fit- a “full” algorithm run
- one with a reduced set of coefficients
- one fit to permanent snow, etc.
num_obs: Number of clear observations used within the segment
These attributes are listed in the MATLAB CCDC implementation in TrendSeasonalFit_v12_30ARDLine.m:163. Additional attributes are recorded during the land cover classification phase:
class: Land cover category- The most likely land cover category predicted by RandomForest
- Class_Line1_4.m:84
classQA: Land cover category QA/QC value- Taken as the "margin" of the number of votes for the most likely class and the second most likely class from RandomForest, normalized by the total number of trees in the ensemble
100 * (votes_1 - votes_2) / n_tree- Class_Line1_4.m:93
For products that describe the second most likely land cover class per
segment, one would also need to record a class2 and class2QA when
performing the land cover classification.
- Primary class
- ShowLCMap.m:165
- Attributes:
pos,t_start, andt_endclass
- Primary class probability
- ShowLCMap.m:167
- Attributes
pos,t_start, andt_endclassQA
- Secondary class
- Not implemented yet
- Attributes
pos,t_start, andt_endclass2
- Secondary class probability
- Not implemented yet
- Attributes
pos,t_start, andt_endclass2QA
- Change date
- ShowLCMap.m:180
- Attributes
pos,t_start, andt_endt_break
- Change magnitude
- ShowLCMap.m:182
- Taken as the L2-norm of the
magnituderecorded for each band - Attributes:
pos,t_start, andt_endt_breakmagnitude
- Change transitions (from-to)
- Represents full class transition matrix
- Attributes:
pos,t_start, andt_endclassandclass2
- Condition (TC Brightness slope)
- Currently implemented as EVI ShowLCMap.m:158
- Note that EVI is derived from the model fits of the raw Landsat bands (blue, red, nir)
- Attributes:
pos,t_start, andt_endcoefs
- Condition (TC Greenness slope)
- Attributes:
pos,t_start, andt_endcoefs
- Attributes:
- Condition (TC Wetness slope)
- Attributes:
pos,t_start, andt_endcoefs
- Attributes:
- Time segment length
- Not implemented yet
- Attributes:
pos,t_start, andt_end
- Time since last change
- Not implemented yet
- Attributes
pos,t_start, andt_endt_break
- Number of observations
- ShowLCMap.m:162
- Attributes:
pos,t_start, andt_endnum_obs
- Model fit attributes
- ShowLCMap.m:160
- Attributes:
pos,t_start, andt_endcategory