supervised machine learning self create_features(if target_typeself target ftype target_type self display( ,"there are",len(self input_features),"input features" def __str__(self)if self train and len(self train)> return ("data"+str(len(self train))+training examples+str(len(self test))+test examples+str(len(self train[ ]))+features "elsereturn ("data"+str(len(self train))+training examples+str(len(self test))+test examples " feature is function that takes an example and returns value in the range of the feature each feature has frangewhich gives the range of the featureand an ftype that gives the typeone of "boolean""numericor "categoricallearnproblem py -(continued def create_features(self)"""create the set of features ""self target none self input_features [for in range(self num_properties)def feat( ,index= )return [indexif self headerfeat __doc__ self header[ielsefeat __doc__ " ["+str( )+"]feat frange list(self domains[ ]feat ftype self infer_type(feat frangeif =self target_indexself target feat elseself input_features append(featwe try to infer the type of each feature sometimes this can be wrong( when the numbers are really categoricaland so needs to be set explicitly learnproblem py -(continued def infer_type(self,domain)"""infers the type of feature with domain ""if all( in {true,falsefor in domain)return "booleanif all(isinstance( ,(float,int)for in domain)return "numericversion june