utils/kdd_parser.py
def feature_str2num(self, str_val, index):
        """Given the string value and index within the line, convert the feature into a numerical value
        """
        (feature_name, feature_type) = self.schema_key[index]
        if feature_type == 'symbolic':
            try:
                feat_val = float(self.symbolic_features[feature_name].index(str_val))
            except ValueError as e:
                self.symbolic_features[feature_name].append(str_val)
                feat_val = float(self.symbolic_features[feature_name].index(str_val))
        else:
            feat_val = float(str_val)
        return feat_val
Given the string value and index within the line, convert the feature into a numerical value
        
Given the string value and index within the line, convert the feature into a numerical value
Given the string value and index within the line convert the feature into a numerical value
def feature_str2num(self, str_val, index):
        (feature_name, feature_type) = self.schema_key[index]
        if feature_type == 'symbolic':
            try:
                feat_val = float(self.symbolic_features[feature_name].index(str_val))
            except ValueError as e:
                self.symbolic_features[feature_name].append(str_val)
                feat_val = float(self.symbolic_features[feature_name].index(str_val))
        else:
            feat_val = float(str_val)
        return feat_val
def feature_str2num ( self , str_val , index ) : ( feature_name , feature_type ) = self . schema_key [ index ] if feature_type == 'symbolic' : try : feat_val = float ( self . symbolic_features [ feature_name ] . index ( str_val ) ) except ValueError as e : self . symbolic_features [ feature_name ] . append ( str_val ) feat_val = float ( self . symbolic_features [ feature_name ] . index ( str_val ) ) else : feat_val = float ( str_val ) return feat_val
Given the string value and index within the line, convert the feature into a numerical value
Given the string value and index within the line convert the feature into a numerical value
"""Given the string value and index within the line, convert the feature into a numerical value
        """
self
str_val
index