|
|
from sklearn.pipeline import Pipeline |
|
|
from pipeline_classes import CreateCombinedDataFrame |
|
|
from _config import config |
|
|
import time |
|
|
import pandas as pd |
|
|
|
|
|
accel_data = pd.read_csv(config["accel_path"]) |
|
|
reports_data = pd.read_csv(config["reports_path"]) |
|
|
|
|
|
X = (reports_data, accel_data) |
|
|
|
|
|
|
|
|
combining_dataframes_pipeline = Pipeline([ |
|
|
|
|
|
('create_combined_dataframe', CreateCombinedDataFrame(time_window=config["time_window"], label_columns=config["label_columns"])), |
|
|
]) |
|
|
|
|
|
|
|
|
start_time = time.time() |
|
|
|
|
|
|
|
|
output_df = combining_dataframes_pipeline.fit_transform(X) |
|
|
|
|
|
|
|
|
end_time = time.time() |
|
|
print(f"Time taken: {int((end_time - start_time) // 60)} minutes and {(end_time - start_time) % 60:.2f} seconds") |
|
|
|