functime-org / functime

Time-series machine learning at scale. Built with Polars for embarrassingly parallel feature extraction and forecasts on panel data.
https://docs.functime.ai
Apache License 2.0
1.02k stars 55 forks source link

Float support in `train_test_split` #167

Closed FBruzzesi closed 7 months ago

FBruzzesi commented 8 months ago

Description

functime.cross_validation.train_test_split only supports test_size of type int. This is completely fine as long as all entities have the same cardinality. However if and when dealing with entities that have a different group size this can be problematic - e.g. a test size can be larger than total samples for one entity but not another.

Solution

Supporting float would: