mirror of
https://github.com/velocitatem/PHANTOM.git
synced 2026-05-31 16:43:36 +00:00
32 refine data pipeline training data construction (#37)
* feature: modularized feature engineering for ml setup (new pipeline) * chore: updating imports properly * test: updating fixtures with ua and meta * chore: migrating code ignore groups * chore: syntax cleaning and code quality * chore: fixing pipeline data compatability * Update experiments/procesing/steps/session.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * chore: refactoring and dixing path joining * chore: refactoring function definition to avoid reinit --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a2a443c027
commit
a1916c966c
@@ -7,12 +7,12 @@ class AggregatePriceLogsStep(BaseContextStep):
|
||||
"""
|
||||
Aggregate price logs into time windows using VECTORIZED operations.
|
||||
Input: price_logs_df
|
||||
Output: list of price chunks with [productId, price]
|
||||
Output: DataFrame with columns [productId, price]
|
||||
"""
|
||||
|
||||
def transform(self, price_logs_df: pd.DataFrame):
|
||||
if price_logs_df.empty:
|
||||
return []
|
||||
return pd.DataFrame(columns=['productId', 'price'])
|
||||
|
||||
df = price_logs_df.copy()
|
||||
ts_col = self.context.config.get('ts_col', 'ts')
|
||||
|
||||
Reference in New Issue
Block a user