def test_dataset_split(self):
     X = [i for i in xrange(97)]
     ce = ClassificationEvaluator(X) 
     ce.evaluate(K=10)
'''
Created on 21 Mar 2012

@author: george
'''
import numpy
from database.warehouse import WarehouseServer
from analysis.classification.tree import TreeClassifier
from database.model.agents import TrainingAuthor
from evaluation.evaluators import ClassificationEvaluator

ws = WarehouseServer()
authors = ws.get_all_documents(type=TrainingAuthor)
ce = ClassificationEvaluator(authors, ["Celebrity", "Media", "Journalists", "Activists", "Commoner"])
metrics = ce.evaluate(classifier=TreeClassifier(), K=10)
print metrics