Package: vbp
ValueBasedPrioritizationArticleAcademic article:https://github.com/freeradical13/ValueBasedPrioritization/raw/master/value_based_prioritization.pdfInstallationhttps://pypi.org/project/vbp/pip3 install vbpvbpValue Based Prioritization (vbp) uses value theory to quantitatively
prioritize potential actions to accomplish a goal.Thevbp.runmodule may be used from the command line to perform
different VBP actions such as listing actions (list), counting
actions (count), predicting values (predict), running Modeled VBP
(modeled_value_based_prioritization), and more. For usage, run:python3 -m vbp.runAny non-terminal output goes to thevbpoutputsub-folder.Here is a simple example counting the number of groupings of
underlying causes of death for the United States for the default data
type:python3 -m vbp.run count UCODUnitedStatesAlternatively, if installed throughpip, avbpscript wrapper may
be used:vbp count UCODUnitedStatesThe academic article above includes footnotes with details on how to
runvbpto produce the output of each step.This package provides abstract classes and utility methods to run
VBP, mostly focused on Modeled VBP which uses time series data to
predict future values and prioritize actions based on the relative
predicted values.Thevbp.DataSourceclass is the base abstract class for VBP.Thevbp.TimeSeriesDataSourceabstract class inherits fromvbp.DataSourceand may be used for Modeled VBP. Thevbp.ExampleDataSourceclass demonstrates a simple data source based
onvbp.TimeSeriesDataSource.Built-in Modeled VBPs include Underlying Cause of Death models for
the United States (vbp.ucod.united_states.UCODUnitedStates) and the
World (vbp.ucod.world.UCODWorld). These
data sources both inherit fromvbp.ucod.icd.ICDDataSourcewhich
inherits fromvbp.TimeSeriesDataSource.RunningThe model type is specified with--ets,--ols, and/or--prophet.
These are not mutually exclusive; if combined duringmodeled_value_based_prioritization, an average is taken of the
results. The default is--ets.By default, action names are obfuscated to reduce bias during model
building and testing. Specify--do-not-obfuscateto show actual names.Some data sources have different data types (e.g. mutually exclusive
groupings of data). Add the-aargument before the data source
name to run for all data types. Add the--data-type Xargument after
the data source name to specify a specific data type.In general, a list of actions may be specified to run for just that
list; otherwise, without such a list, all actions are processed.Examples:python3 -m vbp.run modeled_value_based_prioritization UCODUnitedStates

python3 -m vbp.run modeled_value_based_prioritization UCODUnitedStates --do-not-obfuscate "Heart disease" CancerExponential SmoothingUsingexponential smoothing:python3 -m vbp.run modeled_value_based_prioritization ${DATA_SOURCE} --etsSpecify--ets-no-multiplicative-modelsto only use additive models.Specify--ets-no-additive-modelsto only use multiplicative models.Linear RegressionUsinglinear regression.python3 -m vbp.run modeled_value_based_prioritization ${DATA_SOURCE} --olsSpecify--ols-max-degrees Xto model higher degrees.ProphetUsingFacebook Prophet.python3 -m vbp.run modeled_value_based_prioritization ${DATA_SOURCE} --prophetUnited StatesAs of 2019-03-01, the unzipped U.S. mortality data consumes ~36GB of
disk. It will be downloaded and unzipped automatically when a function
is used that needs it.Long-term, comparable, leading causes of deathGeneratedata/ucod/united_states/comparable_data_since_1959.xlsxfor
all long-term, comparable, leading causes of death inhttps://www.cdc.gov/nchs/data/dvs/lead1900_98.pdf:python3 -m vbp.run prepare_data UCODUnitedStatesRows 1900:1957 and the sheetComparability Ratiosindata/ucod/united_states/comparable_ucod_estimates.xlsxwere manually
input fromhttps://www.cdc.gov/nchs/data/dvs/lead1900_98.pdfOpencomparable_data_since_1959.xlsxand copy rows 1959:Present.Opencomparable_ucod_estimates.xlsxand paste on top starting
at 1959.Processcomparable_ucod_estimates.xlsxwith itsComparability Ratiossheet to generatecomparable_ucod_estimates_ratios_applied.xlsx:python3 -m vbp.run prepare_data UCODUnitedStates --comparable-ratiosFinal output:python3 -m vbp.run modeled_value_based_prioritization UCODUnitedStates --data-type UCOD_LONGTERM_COMPARABLE_LEADINGWorldAs of 2019-03-01, the unzipped World mortality data consumes ~320MB of
disk. It will be downloaded and unzipped automatically when a function
is used that needs it.When testing, writing data spreadsheets takes a lot of time and may
be avoided with --do-not-write-spreadsheets.Creating a new Data SourceReview vbp/example.py for a simple example. The basic process is:Create a sub-class of vbp.DataSource in somename.pyImplement all@abc.abstractmethodmethods and override any
other superclass methods as needed.Import somename.py at the top of vbp/run.pyDevelopmentPrerequisites:pip3 install numpy pandas matplotlib statsmodels scipy fbprophetUpdating PyPI package:# Edit version in setup.py and __init__.py
python3 setup.py bdist bdist_wheel
python3 -m twine upload --skip-existing dist/*
# https://pypi.org/project/vbp/