Systems and methods for probabilistic estimation in tree-based forecast models
Systems and methods in which a historical data set is pre-processed once per trained machine-learning model; a value of an unknown sample is forecast while tracking a leaf path of the unknown sample; the leaf path of the unknown sample is limited to a subset of trees in each trained-machine model; a set of related historical samples is determined based on the leaf path of the unknown sample, and a set of quantiles is determined from the leaf path of the unknown sample. Inventory is loaded according to the set of quantiles.
1 . A computer-implemented method, comprising:
pre-processing, by a processor, a historical data set the pre-processing executed once per trained machine-learning model;
forecasting, by the processor, a value of an unknown sample while tracking a leaf path of the unknown sample;
limiting, by the processor, the leaf path of the unknown sample to a subset of trees in each trained-machine model;
determining, by the processor, a set of related historical samples based on the leaf path of the unknown sample; and
determining, by the processor, a set of quantiles from the leaf path of the unknown sample.
2 . The computer-implemented method of claim 1 , wherein pre-processing the historical data set comprises:
training, by the processor, a tree-based machine learning model;
making, by the processor, a forecast for the historical data set;
tracking, by the processor, one or more leaf paths associated with the forecast for the historical data set; and
creating, by the processor, a group of similar samples in the historical data set at each branch of the tree-based machine learning model.
3 . The computer-implemented method of claim 2 , wherein training the tree-based model comprises:
preparing, by the processor, the historical data set for training;
defining, by the processor, a target variable;
selecting, by the processor, a set of features; and
building, by the processor, a decision tree.
4 . The computer-implemented method of claim 1 , wherein determining the set of related historical samples comprises:
determining, by the processor, a subset of frequently-repeating training samples from the historical data set, on the leaf path of the unknown sample;
estimating, by the processor, a probability density function for the leaf path of the unknown sample;
generating, by the processor, a set of synthetic values from the probability density function;
computing, by the processor, the quantiles based on specified service levels and the set of synthetic values; and
outputting, by the processor, a quantile forecast for the unknown sample.
5 . The computer-implemented method of claim 1 , further comprising loading inventory in accordance with the set of quantiles.
6 . A system comprising:
a processor; and
a memory storing instructions that, when executed by the processor, configure the system to:
pre-process, by the processor, a historical data set the pre-processing executed once per trained machine-learning model;
forecast, by the processor, a value of an unknown sample while tracking a leaf path of the unknown sample;
limit, by the processor, the leaf path of the unknown sample to a subset of trees in each trained-machine model;
determine, by the processor, a set of related historical samples based on the leaf path of the unknown sample; and
determine, by the processor, a set of quantiles from the leaf path of the unknown sample.
7 . The system of claim 6 , wherein when pre-processing the historical data set, the system is further configured to:
train, by the processor, a tree-based machine learning model;
make, by the processor, a forecast for the historical data set;
track, by the processor, one or more leaf paths associated with the forecast for the historical data set; and
create, by the processor, a group of similar samples in the historical data set at each branch of the tree-based machine learning model.
8 . The system of claim 7 , wherein when training the tree-based model, the system is further configured to:
prepare, by the processor, the historical data set for training;
define, by the processor, a target variable;
select, by the processor, a set of features; and
build, by the processor, a decision tree.
9 . The system of claim 6 , wherein when determining the set of related historical samples, the system is further configured to:
determine, by the processor, a subset of frequently-repeating training samples from the historical data set, on the leaf path of the unknown sample;
estimate, by the processor, a probability density function for the leaf path of the unknown sample;
generate, by the processor, a set of synthetic values from the probability density function;
compute, by the processor, the quantiles based on specified service levels and the set of synthetic values; and
output, by the processor, a quantile forecast for the unknown sample.
10 . The system of claim 6 , wherein inventory is loaded in accordance with the set of quantiles.
11 . A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to:
pre-process, by a processor, a historical data set the pre-processing executed once per trained machine-learning model;
forecast, by the processor, a value of an unknown sample while tracking a leaf path of the unknown sample;
limit, by the processor, the leaf path of the unknown sample to a subset of trees in each trained-machine model;
determine, by the processor, a set of related historical samples based on the leaf path of the unknown sample; and
determine, by the processor, a set of quantiles from the leaf path of the unknown sample.
12 . The computer-readable storage medium of claim 11 ,
wherein when pre-processing the historical data set, the instructions that when executed by the computer, further cause the computer to:
train, by the processor, a tree-based machine learning model;
make, by the processor, a forecast for the historical data set;
track, by the processor, one or more leaf paths associated with the forecast for the historical data set; and
create, by the processor, a group of similar samples in the historical data set at each branch of the tree-based machine learning model.
13 . The computer-readable storage medium of claim 12 ,
wherein when training the tree-based model, the instructions that when executed by the computer, further cause the computer to:
prepare, by the processor, the historical data set for training;
define, by the processor, a target variable;
select, by the processor, a set of features; and
build, by the processor, a decision tree.
14 . The computer-readable storage medium of claim 11 ,
wherein when determining the set of related historical samples, the instructions that when executed by the computer, further cause the computer to:
determine, by the processor, a subset of frequently-repeating training samples from the historical data set, on the leaf path of the unknown sample;
estimate, by the processor, a probability density function for the leaf path of the unknown sample;
generate, by the processor, a set of synthetic values from the probability density function;
compute, by the processor, the quantiles based on specified service levels and the set of synthetic values; and
output, by the processor, a quantile forecast for the unknown sample.
15 . The computer-readable storage medium of claim 11 , wherein inventory is loaded in accordance with the set of quantiles.
16 . A computer-implemented method, comprising:
pre-processing, by a processor, a historical data set associated with a plurality of stores and a plurality of products, the pre-processing executed once per trained machine-learning model;
forecasting, by the processor, a value of an unknown sample while tracking a leaf path of the unknown sample;
limiting, by the processor, the leaf path of the unknown sample to a subset of trees in each trained-machine model;
determining, by the processor, a set of related historical samples based on the leaf path of the unknown sample;
determining, by the processor, a set of quantiles across the plurality of stores from the leaf path of the unknown sample;
constructing, by the processor, one or more tradeoff curve functions for each combination of the plurality of products and stores from the set of quantiles;
constructing, by the processor, an objective function that accepts a quantity per store and computes a metric from the one or more tradeoff curves; and
determining, by the processor, a set of quantities across the plurality of stores that maximize the metric while being constrained by a maximum available quantity.
17 . The computer-implemented method of claim 16 , wherein pre-processing the historical data set comprises:
training, by the processor, a tree-based machine learning model;
making, by the processor, a forecast for the historical data set;
tracking, by the processor, one or more leaf paths associated with the forecast for the historical data set; and
creating, by the processor, a group of similar samples in the historical data set at each branch of the tree-based machine learning model.
18 . The computer-implemented method of claim 17 , wherein training the tree-based model comprises:
preparing, by the processor, the historical data set for training;
defining, by the processor, a target variable;
selecting, by the processor, a set of features; and
building, by the processor, a decision tree.
19 . The computer-implemented method of claim 16 , wherein determining the set of related historical samples comprises:
determining, by the processor, a subset of frequently-repeating training samples from the historical data set, on the leaf path of the unknown sample;
estimating, by the processor, a probability density function for the leaf path of the unknown sample;
generating, by the processor, a set of synthetic values from the probability density function;
computing, by the processor, the quantiles based on specified service levels and the set of synthetic values; and
outputting, by the processor, a quantile forecast for the unknown sample.
20 . The computer-implemented method of claim 16 , further comprising loading inventory at each of the plurality of stores in accordance with the set of quantities.
21 . A system comprising:
a processor; and
a memory storing instructions that, when executed by the processor, configure the system to:
pre-process, by the processor, a historical data set associated with a plurality of stores and a plurality of products, the pre-processing executed once per trained machine-learning model;
forecast, by the processor, a value of an unknown sample while tracking a leaf path of the unknown sample;
limit, by the processor, the leaf path of the unknown sample to a subset of trees in each trained-machine model;
determine, by the processor, a set of related historical samples based on the leaf path of the unknown sample;
determine, by the processor, a set of quantiles across the plurality of stores from the leaf path of the unknown sample;
construct, by the processor, one or more tradeoff curve functions for each combination of the plurality of products and stores from the set of quantiles;
construct, by the processor, an objective function that accepts a quantity per store and computes a metric from the one or more tradeoff curves; and
determine, by the processor, a set of quantities across the plurality of stores that maximize the metric while being constrained by a maximum available quantity.
22 . The system of claim 21 , wherein when pre-processing the historical data set, the system is further configured to:
train, by the processor, a tree-based machine learning model;
make, by the processor, a forecast for the historical data set;
track, by the processor, one or more leaf paths associated with the forecast for the historical data set; and
create, by the processor, a group of similar samples in the historical data set at each branch of the tree-based machine learning model.
23 . The system of claim 22 , wherein when training the tree-based model, the system is further configured to:
prepare, by the processor, the historical data set for training;
define, by the processor, a target variable;
select, by the processor, a set of features; and
build, by the processor, a decision tree.
24 . The system of claim 21 , wherein when determining the set of related historical samples, the system is further configured to:
determine, by the processor, a subset of frequently-repeating training samples from the historical data set, on the leaf path of the unknown sample;
estimate, by the processor, a probability density function for the leaf path of the unknown sample;
generate, by the processor, a set of synthetic values from the probability density function;
compute, by the processor, the quantiles based on specified service levels and the set of synthetic values; and
output, by the processor, a quantile forecast for the unknown sample.
25 . The system of claim 21 , wherein inventory is loaded at each of the plurality of stores in accordance with the set of quantities.
26 . A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to:
pre-process, by a processor, a historical data set associated with a plurality of stores and a plurality of products, the pre-processing executed once per trained machine-learning model;
forecast, by the processor, a value of an unknown sample while tracking a leaf path of the unknown sample;
limit, by the processor, the leaf path of the unknown sample to a subset of trees in each trained-machine model;
determine, by the processor, a set of related historical samples based on the leaf path of the unknown sample;
determine, by the processor, a set of quantiles across the plurality of stores from the leaf path of the unknown sample;
construct, by the processor, one or more tradeoff curve functions for each combination of the plurality of products and stores from the set of quantiles;
construct, by the processor, an objective function that accepts a quantity per store and computes a metric from the one or more tradeoff curves; and
determine, by the processor, a set of quantities across the plurality of stores that maximize the metric while being constrained by a maximum available quantity.
27 . The computer-readable storage medium of claim 26 ,
wherein when pre-processing the historical data set, the instructions that when executed by the computer, further cause the computer to:
train, by the processor, a tree-based machine learning model;
make, by the processor, a forecast for the historical data set;
track, by the processor, one or more leaf paths associated with the forecast for the historical data set; and
create, by the processor, a group of similar samples in the historical data set at each branch of the tree-based machine learning model.
28 . The computer-readable storage medium of claim 27 , wherein when training the tree-based model, the instructions that when executed by the computer, further cause the computer to:
prepare, by the processor, the historical data set for training;
define, by the processor, a target variable;
select, by the processor, a set of features; and
build, by the processor, a decision tree.
29 . The computer-readable storage medium of claim 26 , wherein when determining the set of related historical samples, the instructions that when executed by the computer, further cause the computer to:
determine, by the processor, a subset of frequently-repeating training samples from the historical data set, on the leaf path of the unknown sample;
estimate, by the processor, a probability density function for the leaf path of the unknown sample;
generate, by the processor, a set of synthetic values from the probability density function;
compute, by the processor, the quantiles based on specified service levels and the set of synthetic values; and
output, by the processor, a quantile forecast for the unknown sample.
30 . The computer-readable storage medium of claim 26 , wherein inventory is loaded at each of the plurality of stores in accordance with the set of quantities.