Description Usage Arguments Details Value Author(s) References Examples

View source: R/APFAfunctions.R

The function measures the prediction efficiency of the model using K-fold cross-validation.

1 | ```
cross.validate(Data, K = 10, crit = NULL, beagle = TRUE, dir='')
``` |

`Data` |
A data frame |

`K` |
Number of cross validations |

`crit` |
The model selection criterion, either AIC or BIC, for penalised likelihood method. |

`beagle` |
If |

`dir` |
specifying the path for 'beagle.jar' directory. |

The cross validation for a given data frame is done as follows,\
1. The data is divided in to `K`

subsets of equal sizes.\
2. At each cross validation step in `k=1:K`

, $k^th$ subset is taken as the test data
and the rest as training data.\
3. APFA model is fitted to the training data using a model selection method (AIC, BIC or Beagle),
then using the edge probabilities of the fitted model, the loglikelihood and the per-symbol loglikelihood
are calculated for the test data set.\
4. The function returns the mean of the log-likelihood from K-cross validation and pzero. \

Returns per symbol loglikelihood of the K-cross validation.

Smitha Ankinakatte and David Edwards

Thollard, F.; Dupont, P. & de la Higuera, C. Probabilistic DFA Inference using Kullback-Leibler Divergence and Minimality 17th International Conference on Machine Learning., 2000, 975-982\

1 2 |

gRapfa documentation built on May 2, 2019, 6:54 a.m.

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.