MCPcopy Create free account
hub / github.com/Chain123/Meta-HAR / action_encoding

Function action_encoding

data_process/feature_extraction.py:100–107  ·  view source on GitHub ↗
(act, one_hot=False)

Source from the content-addressed store, hash-verified

98
99
100def action_encoding(act, one_hot=False):
101 act_int = action_dict[act]
102 if one_hot:
103 result = np.zeros(len(action_dict), dtype=int)
104 result[act_int] = 1
105 return result
106 else:
107 return act_int
108
109
110def data_process_sensor(data_str, length=150):

Callers 1

feature_extractFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…