import random import math import csv import operator def loadDataset(filename,split,trainingset=[],testset=[]): with open(filename) as csvfile: lines=csv.reader(csvfile) dataset=list(lines) for x in range(len(dataset)-1): for y in range(4): dataset[x][y]=float(dataset[x][y]) if random.random()