extractor.feature {LSTMfactors} | R Documentation |
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"
)
Arguments
response |
A required |
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. |
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
Value
A matrix (1×20) containing all the features for the LSTM.
Author(s)
Haijiang Qin <Haijiang133@outlook.com>
See Also
Examples
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
## Run extractor.feature function
features <- extractor.feature(response)
print(features)