Closed Lumik7 closed 6 years ago
@Lumik7 @MoBran Added in 8334501d61470a4075e6da16b3e10ad542e61bee. Forgot to switch back to my branch, so I pushed directly to master by accident - sorry.
Code and code usage can be reviewed in Preprocessor.preprocess()
. Relevant methods are _cut_off_start_and_end_in_dataframes(...)
and _cut_off_start_and_end_in_dataframe(...)
.
Closing this issue If there are no objections.
Hey just saw your implementation. I don't know if i wrote "scripted" lower case all the time. Could you cast the string to lower case just to make sure?
Done in 23dc71c0b8ef09689bf6a6296b1a37b21454acea. Should I merge with master?
thanks, yes go ahead
I found a bug with the cutting procedure, it seems that only the left side of a trip is cut. When running the preprocessing()
function with a cutoff_in_seconds=180
:
# 3. Cut first and last 30 seconds from scripted trips.
dfs = Preprocessor.replace_none_values_with_empty_dataframes(
Preprocessor._cut_off_start_and_end_in_dataframes(
dataframes=dfs, list_of_dataframe_names_to_cut=["sensor", "location"], cutoff_in_seconds=180
)
)
3 minutes are cut from the beginning, but the right side stays the same, see picture:
The expected behaviour would be that 180 seconds are cut on both ends.
That's weird. I'll have a look at it tomorrow.
Fixed and merged into master, was a rather stupid mistake (+ instead of -). I'll close this issue. Should the error still occur, please reopen it.
Create a method in preprocessing.py that deals with the following issue: From task description: "Only for scripted trips: The first and last few seconds of each trip will be affected by the
smartphone handling when you start and stop the trip and put the phone into it’s
supposed position. That’s why you must discard the first and last 30 seconds of your
scripted trips and NOT consider these for further analysis."