Description Usage Arguments Value References See Also Examples

View source: R/feature_extraction.R

`chooseK_mds`

choose the number of multidimensional scaling features
to be extracted by cross-validation.

1 2 3 | ```
chooseK_mds(seqs = NULL, K_cand, dist_type = "oss_action",
n_fold = 5, max_epoch = 100, step_size = 0.01, tot = 1e-06,
return_dist = FALSE, L_set = 1:3)
``` |

`seqs` |
a |

`K_cand` |
the candidates of the number of features. |

`dist_type` |
a character string specifies the dissimilarity measure for two response processes. See 'Details'. |

`n_fold` |
the number of folds for cross-validation. |

`max_epoch` |
the maximum number of epochs for stochastic gradient descent. |

`step_size` |
the step size of stochastic gradient descent. |

`tot` |
the accuracy tolerance for determining convergence. |

`return_dist` |
logical. If |

`L_set` |
length of ngrams considered |

`chooseK_mds`

returns a list containing

`K` |
the value in |

`K_cand` |
the candidates of the number of features. |

`cv_loss` |
the cross-validation loss for each candidate in |

`dist_mat` |
the dissimilary matrix. This element exists only if |

Gomez-Alonso, C. and Valls, A. (2008). A similarity measure for sequences of
categorical data based on the ordering of common elements. In V. Torra & Y. Narukawa (Eds.)
*Modeling Decisions for Artificial Intelligence*, (pp. 134-145). Springer Berlin Heidelberg.

`seq2feature_mds`

for feature extraction after choosing
the number of features.

1 2 3 4 5 | ```
n <- 50
set.seed(12345)
seqs <- seq_gen(n)
K_res <- chooseK_mds(seqs, 5:10, return_dist=TRUE)
theta <- seq2feature_mds(K_res$dist_mat, K_res$K)$theta
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.