feat: Add absolute value option to time feature extraction
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -36,9 +36,12 @@ class FeatureExtractor:
|
||||
result += f"{feature}: {value:.4f}\n"
|
||||
return result
|
||||
|
||||
def ExtractTimeFeatures(object):
|
||||
def ExtractTimeFeatures(object, absolute):
|
||||
data = pd.read_csv(object, skiprows=1) # Skip the header row separator char info
|
||||
extractor = FeatureExtractor(data.iloc[:, 1].values) # Assuming the data is in the second column
|
||||
if absolute:
|
||||
extractor = FeatureExtractor(np.abs(data.iloc[:, 1].values)) # Assuming the data is in the second column
|
||||
else:
|
||||
extractor = FeatureExtractor(data.iloc[:, 1].values)
|
||||
features = extractor.features
|
||||
return features
|
||||
# Save features to a file
|
||||
|
||||
Reference in New Issue
Block a user