rics.ml.time_split.types#

Types related to splitting data.

Module Attributes

DatetimeTypes

Types that may be cast to pandas.Timestamp.

DatetimeIterable

Iterable that may be cast to pandas.DatetimeIndex.

TimedeltaTypes

Types that may be cast to pandas.Timedelta.

Schedule

User schedule type.

Span

User span type.

Flex

Flexibility frequency string for floor/ceil.

DatetimeSplits

A list of bounds.

Classes

DatetimeSplitBounds(start, mid, end)

A 3-tuple which denotes two adjacent datetime ranges.

DatetimeSplitCounts(data, future_data)

Relative importance of data and future_data.

DatetimeTypes#

Types that may be cast to pandas.Timestamp.

alias of Union[str, Timestamp, datetime, date, datetime64]

DatetimeIterable#

Iterable that may be cast to pandas.DatetimeIndex.

alias of Iterable[Union[str, Timestamp, datetime, date, datetime64]]

TimedeltaTypes#

Types that may be cast to pandas.Timedelta.

alias of Union[str, Timedelta, timedelta, timedelta64]

Schedule#

User schedule type.

alias of Union[DatetimeIndex, Iterable[Union[str, Timestamp, datetime, date, datetime64]], str, Timedelta, timedelta, timedelta64]

Span#

User span type. Used to determine limits from the timestamps given by a Schedule.

alias of Union[int, Literal[‘all’], str, Timedelta, timedelta, timedelta64]

Flex#

Flexibility frequency string for floor/ceil. Pass False to disable.

alias of Union[bool, Literal[‘auto’], str]

class DatetimeSplitBounds(start: Timestamp, mid: Timestamp, end: Timestamp)[source]#

Bases: NamedTuple

A 3-tuple which denotes two adjacent datetime ranges.

start: Timestamp#

Left (inclusive) limit of the data range.

mid: Timestamp#

Schedule timestamp.

Right (exclusive) limit of the data range, left (inclusive) limit of the future_data range.

end: Timestamp#

Right (exclusive) limit of the future_data range.

DatetimeSplits#

A list of bounds.

alias of List[DatetimeSplitBounds]

class DatetimeSplitCounts(data: int, future_data: int)[source]#

Bases: NamedTuple

Relative importance of data and future_data.

data: int#

Alias for field number 0

future_data: int#

Alias for field number 1