Description Usage Arguments Value Author(s) Examples
gs.xval.split A function to split a dataset into
training and testing sets for cross validation.
1  | gs.xval.split(graphs, Y, k = "loo", ...)
 | 
graphs | 
 
  | 
Y | 
 
  | 
k | 
 the cross-validated method to perform. Defaults to  
  | 
... | 
 trailing args.  | 
sets the cross-validation sets as an object of class "XV". Each element of the list contains the following items:
 | 
 the training data as a   | 
 | 
 the training labels as a   | 
 | 
 the testing data as a   | 
 | 
 the testing labels as a   | 
Eric Bridgeford
1 2 3 4 5 6 7 8  | # prepare data for 10-fold validation
library(graphstats)
data <- gs.sims.er(n=100, v=10, priors=c(1), p=c(0.5))  # 100 examples of 10x10 graphs
graphs <- data$graphs; Y <- data$Y
sets.xval.10fold <- lol.xval.split(graphs, Y, k=10)
# prepare data for loo validation
sets.xval.loo <- lol.xval.split(graphs, Y, k='loo')
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.