Skip to content

Commit

Permalink
fix numerical features order issue
Browse files Browse the repository at this point in the history
  • Loading branch information
egillax committed Oct 30, 2023
1 parent dac66a0 commit 20e855b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inst/python/Dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self,
if pl.count(self.numerical_features) == 0:
self.num = None
else:
numerical_data = data.filter(pl.col('columnId').is_in(self.numerical_features)). \
numerical_data = data.filter(pl.col('columnId').is_in(self.numerical_features)).sort(by='columnId'). \
with_row_count('newColumnId').with_columns(pl.col('newColumnId').first().over('columnId').
rank(method="dense") - 1, pl.col('rowId') - 1) \
.select(pl.col('rowId'), pl.col('newColumnId').alias('columnId'), pl.col('covariateValue')).collect()
Expand Down

0 comments on commit 20e855b

Please sign in to comment.