Skip to content

Commit

Permalink
remove somehow duplicated function
Browse files Browse the repository at this point in the history
  • Loading branch information
HLasse committed Feb 22, 2024
1 parent b7ea9fa commit c2b9529
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/timeseriesflattenerv2/spec_processors/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,30 +139,6 @@ def _slice_and_aggregate_spec(
TemporalSpec = Union[PredictorSpec, OutcomeSpec, BooleanOutcomeSpec]


def _get_timedelta_frame(
predictiontime_frame: PredictionTimeFrame, value_frame: ValueFrame
) -> TimeDeltaFrame:
# Join the prediction time dataframe
joined_frame = predictiontime_frame.df.join(
value_frame.df, on=predictiontime_frame.entity_id_col_name, how="left"
)

# Get timedelta
timedelta_frame = joined_frame.with_columns(
(
pl.col(value_frame.value_timestamp_col_name)
- pl.col(predictiontime_frame.timestamp_col_name)
).alias("time_from_prediction_to_value")
)

return TimeDeltaFrame(
timedelta_frame,
value_col_name=value_frame.value_col_name,
pred_time_uuid_col_name=predictiontime_frame.pred_time_uuid_col_name,
value_timestamp_col_name=value_frame.value_timestamp_col_name,
)


def process_temporal_spec(
spec: TemporalSpec, predictiontime_frame: PredictionTimeFrame
) -> ProcessedFrame:
Expand Down

0 comments on commit c2b9529

Please sign in to comment.