// Get current instances feature-value pairs
field_pairs = feature_string.split()
field_names = islice(field_pairs, 0, None, 2)
field_values = islice(field_pairs, 1, None, 2)
// Add the feature-value pairs to dictionary
curr_info_dict = dict(izip(field_names, field_values))
After Change
// Get current instances feature-value pairs
field_pairs = feature_string.split()
field_names = islice(field_pairs, 0, None, 2)
field_values = (float(val) for val in islice(field_pairs, 1, None, 2)) // Convert values to floats, because otherwise features"ll be categorical
// Add the feature-value pairs to dictionary
curr_info_dict = dict(izip(field_names, field_values))