Learn R Programming

LSTMfactors (version 1.0.0)

extractor.feature: Extracting features for the pre-trained Long Short Term Memory (LSTM) Network

Description

This function is used to extract the features required by the pre-trained Long Short Term Memory (LSTM) Network. @seealso LSTM

Usage

extractor.feature(
  response,
  cor.type = "pearson",
  use = "pairwise.complete.obs"
)

Value

A matrix (1×20) containing all the features for the LSTM.

Arguments

response

A required N × I matrix or data.frame consisting of the responses of N individuals to I items.

cor.type

A character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson" (default), "kendall", or "spearman". @seealso cor.

use

An optional character string giving a method for computing covariances in the presence of missing values. This must be one of the strings "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs" (default). @seealso cor.

Author

Haijiang Qin <Haijiang133@outlook.com>

Details

For "LSTM", a total of 2 types of features. These features are as follows:

(1)

The top 10 largest eigenvalues.

(2)

The difference of the top 10 largest eigenvalues to the corresponding reference eigenvalues from arallel Analysis (PA). @seealso PA

See Also

LSTM

Examples

Run this code
library(LSTMfactors)
set.seed(123)

##Take the data.DAPCS dataset as an example.
data(data.DAPCS)

response <- as.matrix(data.DAPCS[, 3:22]) ## loading data

# \donttest{
## Run extractor.feature function
features <- extractor.feature(response)

print(features)
# }




Run the code above in your browser using DataLab