def extract_features_from_rawdata(chunk, header, period, features): with open( os.path.join(os.path.dirname(__file__), "resources/channel_info.json")) as channel_info_file: channel_info = json.loads(channel_info_file.read()) data = [convert_to_dict(X, header, channel_info) for X in chunk] return extract_features(data, period, features)
def extract_features_from_rawdata(chunk, header, period, features): with open( os.path.join(os.path.dirname(__file__), "resources/channel_info.json")) as channel_info_file: channel_info = json.loads(channel_info_file.read()) with open( os.path.join( os.path.dirname(__file__), "resources/plausible_values.json")) as plausible_values_file: plausible_values = json.loads(plausible_values_file.read()) # transform raw 2d array for each instance into separate lists for each attribute that contains timestamped tuples # with attribute values (also apply value transformation from channel_info.json. data = [convert_to_dict(X, header, channel_info) for X in chunk] data = [ remove_implausible_values(X, header, plausible_values) for X in data ] return extract_features(data, period, features)
def extract_features_from_rawdata(chunk, header, period, features): with open(os.path.join(os.path.dirname(__file__), "channel_info.json")) as channel_info_file: channel_info = json.loads(channel_info_file.read()) data = [convert_to_dict(X, header, channel_info) for X in chunk] return extract_features(data, period, features)