calculate_subfeatures {ctsfeatures} | R Documentation |
Computes several subfeatures associated with a categorical time series
Description
calculate_features
computes several subfeatures associated with a
categorical time series or between a categorical and a real-valued time series
Usage
calculate_subfeatures(series, n_series, lag = 1, type = NULL)
Arguments
series |
An object of type |
n_series |
A real-valued time series. |
lag |
The considered lag (default is 1). |
type |
String indicating the subfeature one wishes to compute. |
Details
Assume we have a CTS of length with range
,
, with
being the natural estimate of the marginal probability of the
th
category, and
being the natural estimate of the joint probability
for categories
and
at lag l,
. Assume also that
we have a real-valued time series of length
,
.
The function computes the following subfeatures depending on the argument
type
:
If
type=entropy
, the function computes the subfeatures associated with the estimated entropy,,
.
If
type=gk_tau
, the function computes the subfeatures associated with the estimated Goodman and Kruskal's tau,,
.
If
type=gk_lambda
, the function computes the subfeatures associated with the estimated Goodman and Kruskal's lambda,,
.
If
type=uncertainty_coefficient
, the function computes the subfeatures associated with the estimated uncertainty coefficient,,
.
If
type=pearson_measure
, the function computes the subfeatures associated with the estimated Pearson measure,,
.
If
type=phi2_measure
, the function computes the subfeatures associated with the estimated Phi2 measure,,
.
If
type=sakoda_measure
, the function computes the subfeatures associated with the estimated Sakoda measure,,
.
If
type=cramers_vi
, the function computes the subfeatures associated with the estimated Cramer's vi,,
.
If
type=cohens_kappa
, the function computes the subfeatures associated with the estimated Cohen's kappa,,
.
If
type=total_correlation
, the function computes the subfeatures associated with the total correlation,,
(see
type='total_mixed_cor'
in the functioncalculate_features
).If
type=total_mixed_correlation_1
, the function computes the subfeatures associated with the total mixed l-correlation,,
(see
type='total_mixed_correlation_1'
in the functioncalculate_features
).If
type=total_mixed_correlation_2
, the function computes the subfeatures associated with the total mixed q-correlation,,
(see
type='total_mixed_correlation_2'
in the functioncalculate_features
).
Value
The corresponding subfeature
Author(s)
Ángel López-Oriona, José A. Vilar
References
Weiß CH, Göb R (2008). “Measuring serial dependence in categorical time series.” AStA Advances in Statistical Analysis, 92, 71–89.
Examples
sequence_1 <- GeneticSequences[which(GeneticSequences$Series==1),]
suc <- calculate_subfeatures(series = sequence_1, type = 'uncertainty_coefficient')
# Computing the subfeatures associated with the uncertainty coefficient
# for the first series in dataset GeneticSequences
scv <- calculate_subfeatures(series = sequence_1, type = 'cramers_vi' )
# Computing the subfeatures associated with the cramers vi
# for the first series in dataset GeneticSequences