Learn R Programming

fsMTS (version 0.1.7)

fsSparsity: Calculating sparsity of a feature set

Description

fsSparsity calculates the sparsity (share of non-zero components) of the feature set

Usage

fsSparsity(feature.set)

Arguments

feature.set

a matrix that contains feature weights.

Value

returns a share of non-zero components in the feature set

Examples

Run this code
# NOT RUN {
# 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")
fsSparsity(cutoff(mCCF,0.3))

# }

Run the code above in your browser using DataLab