def read_test(filename):
    '''
    Read testset and return feature matrix X.
    X - (entriesToProcess x nfeats)
    '''
    interviews = parseTestCSV(filename, -1)
    entriesToProcess = len(interviews)
    X = extract_feature_Test(interviews, entriesToProcess)
    return X
예제 #2
0
def read_test(filename):
    '''
    Read testset and return feature matrix X.
    filename - Test data csv
    return test - (entriesToProcess x nfeats)
    '''

    directory = os.getcwd()
    os.chdir("Data")

    if (not replace) and os.path.isfile("testFeatureMatrix.npy"):
        print('Reading saved data from npy file')
        test = np.load("testFeatureMatrix.npy")

    else:
        os.chdir("..")
        testInterviews = parseTestCSV(filename, -1)
        entriesToProcess = len(interviews)
        test = extract_feature_Test(interviews, entriesToProcess)
        os.chdir("Data")
        np.save("testFeatureMatrix", test)

    os.chdir("..")
    return test
예제 #3
0
def read_test(filename):
    '''
    Read testset and return feature matrix X.
    filename - Test data csv
    return test - (entriesToProcess x nfeats)
    '''

    directory =os.getcwd()
    os.chdir("Data")

    if (not replace) and os.path.isfile("testFeatureMatrix.npy") : 
        print('Reading saved data from npy file')        
        test = np.load("testFeatureMatrix.npy")
       
    else:
        os.chdir("..")
        testInterviews = parseTestCSV(filename, -1)
        entriesToProcess = len(interviews)
        test = extract_feature_Test(interviews, entriesToProcess)
        os.chdir("Data")
        np.save("testFeatureMatrix", test)
    
    os.chdir("..")
    return test