Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. examples = "List of all 400 examples"
  2. accuracies = Empty list
  3. for(i=0; i<|examples|; i++) {
  4. one = examples[i]
  5. training = examples {one}
  6.  
  7. # !!!!!!!!!!!!!!!!!!!!!!!!!
  8. majority_clf = get majority in training. This is the other class than the class of "one"
  9. # !!!!!!!!!!!!!!!!!!!!!!
  10.  
  11. accuracies.append(majority_clf(one) == class(one))
  12. }
  13. overall_accuracy = sum(accuracies) / |accuracies|
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement