History

class passengersim.core.History

Bases: object

History stores sales data for forecasting

Methods

__init__(*args, **kwargs)

as_arrays

Get all data as numpy arrays

as_mean_arrays

Get mean of data as numpy arrays

current_dep_as_arrays

Get current departure data as numpy arrays

from_arrays

Set all data from numpy arrays

get_closed_flags

Get closed flags for a departure

get_closure

Get closure for a departure

get_sold

Get sold for a departure

get_sold_priceable

Get sold priceable for a departure

get_sold_yieldable

Get sold yieldable for a departure

next_departure

Advance to the next departure

next_timeframe

Advance to the next timeframe

rebuild

Rebuild a History object from arrays and configuration parameters

Attributes

length

n_departures

n_timeframes

sample_number

tf_index_closed_by_ap

truncation_rule

as_arrays()

Get all data as numpy arrays

as_mean_arrays()

Get mean of data as numpy arrays

current_dep_as_arrays()

Get current departure data as numpy arrays

from_arrays()

Set all data from numpy arrays

get_closed_flags()

Get closed flags for a departure

get_closure()

Get closure for a departure

get_sold()

Get sold for a departure

get_sold_priceable()

Get sold priceable for a departure

get_sold_yieldable()

Get sold yieldable for a departure

length
n_departures
n_timeframes
next_departure()

Advance to the next departure

next_timeframe()

Advance to the next timeframe

classmethod rebuild()

Rebuild a History object from arrays and configuration parameters

sample_number
tf_index_closed_by_ap
truncation_rule