Exemplo n.º 1
0
def evaluteFullFile(filename):

    tempname = "tmp_" + filename
    temp = open(tempname, "w")
    
    for row in open(filename, "r").readlines():
        if int(row.split()[3]) > 49:
            continue
        temp.write(row)
    temp.flush()
    evaluate(tempname, "dev2014", "__eval.csv", []) 
    deleteFile(tempname)
Exemplo n.º 2
0
from scipy.spatial.distance import pdist, cdist

from filterDataset import filterDT
from collections import Counter
from getParamters import getParamters
from evaluation import evaluate, deleteFile

###############################################################################
#####----------------------INPUT PART BEGINS-----------------------------######
###############################################################################
args = getParamters()

# The name says by itself
OUTFILE = args.outfile
deleteFile(OUTFILE)

# Options: "flickr", "oracle", "metis", "kmeans"
# "simkmeans", "min-max", "multigraph",
# "spectral", "agglomerative", "affinity"
# "textsim"
METHOD = args.method

# Auxiliar method is an option only if the clustering method is multigraph
AUXILIAR_METHOD = args.method_aux

# Should be "dev2013", "test2013", "dev2014" or "test2014"
WORKING_DATASET = args.working_dataset

# CSV where the main values will be saved
EVAL_CSV = args.evalcsv