Esempio n. 1
0
def merge_data():
    testData1, testClass1, trainData1, trainClass1 = creatData.readData('suicide.txt')
    testData2, testClass2, trainData2, trainClass2 = creatData.readData('non_suicide.txt')
    trainData1.extend(trainData2)
    trainClass1.extend(trainClass2)
    testData1.extend(testData2)
    testClass1.extend(testClass2)
    return testData1, testClass1, trainData1, trainClass1
Esempio n. 2
0
import creatData

testData, testClass, trainData, trainClass = creatData.readData('suicide.txt')
for line in trainData:
    for i in line:
        print i