ds target the feature corresponding to the target ( function as described aboveds input_features list of the input features learnproblem py -(continued class data_set(displayable)"" data set consists of list of training data and list of test data "" def __init__(selftraintest=noneprob_test= target_index= header=nonetarget_typenoneseed=none)# )""" dataset for learning train is list of tuples representing the training examples test is the list of tuples representing the test examples if test is nonea test set is created by selecting each example with probability prob_test target_index is the index of the target if negativeit counts from right if target_index is larger than the number of propertiesthere is no target (for unsupervised learningheader is list of names for the features target_type is either none for automatic detection of target type or one of "numerical""boolean""cartegoricalseed is for random numbernone gives different test set each time ""if seedgiven seed makes partition consistent from run-to-run random seed(seedif test is nonetrain,test partition_data(trainprob_testself train train self test test self display( ,"training set has",len(train),"examples number of columns",{len(efor in train}self display( ,"test set has",len(test),"examples number of columns",{len(efor in test}self prob_test prob_test self num_properties len(self train[ ]if target_index #allows for - - etc self target_index self num_properties target_index elseself target_index target_index self header header self domains [set(for in range(self num_properties)for example in self trainfor ind,val in enumerate(example)self domains[indadd(valself conditions_cache {cache for computed conditions version june