cutoff: Choosing most important features

View source: R/utils.R

cutoffR Documentation

Choosing most important features

Description

cutoff chooses features of highest importance to reach the required percent of sparsity

Usage

cutoff(feature.set, threshold)

Arguments

feature.set

a matrix that contains feature weights.

threshold

the required sparsity of the resulting feature set

Value

returns a binary feature matrix. Columns correspond to components of the time series; rows correspond to lags.

Examples


# Load traffic data
data(traffic.mini)

# Scaling is sometimes useful for feature selection
# Exclude the first column - it contains timestamps
data <- scale(traffic.mini$data[,-1])

mCCF<-fsMTS(data, max.lag=3, method="CCF")
cutoff(mCCF, 0.3)
cutoff(mCCF, 0.1)

mIndependent<-fsMTS(data, max.lag=3, method="ownlags")
cutoff(mIndependent, 0.3)
cutoff(mIndependent, 0.1)

fsMTS documentation built on April 26, 2022, 9:05 a.m.