How can I use 10 folds cross validation in Stanford relation extraction. I created a custom relation extraction model ,and I need to evaluate this model
            Asked
            
        
        
            Active
            
        
            Viewed 92 times
        
    1 Answers
0
            
            
        You may find CrossValidator useful, if you're using the Stanford classifier. Taking a dataset, you can do something like:
Dataset dataset = ...;
double aveAccuracy = new CrossValidator(dataset, 10).computeAverage( (train, dev) -> {
  // train on |train| for the fold
  LinearClassifier classifier = ...;
  // evaluate on |dev| for the fold
  return classifier.evaluateAccuracy(dev);
});
        Gabor Angeli
        
- 5,729
 - 1
 - 18
 - 29