Some interface design decisions regarding input data, outcome in data2draws

Aperta
#22 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
data, tooling

Direzione di ricerca

La issue menziona StanVensimModel, data2draws e i blocchi di dati e di dati trasformati Stan generati, ma non indica alcun file del repository né test. Segui questi punti di ingresso per capire come sono rappresentati integrated_result e i dati forniti dall’utente. Il lavoro è completo quando sono definiti un’interfaccia rivolta all’utente concordata e il comportamento corrispondente del blocco dati generato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A rough implementation of data2draws is partly implemented. You can write the following python code:

model = StanVensimModel("ds_white_sterman", am, 0.0, list(range(0, 10)))  # 0.0 is initial time, range(0, 10) is the integrations times
model.set_prior("inventory_adjustment_time", "normal", 0, 1)
model.set_prior("minimum_order_processing_time", "normal", 0, 1)

This (currently) results in the following generated code:

#include ds_white_sterman_functions.stan

data{
}

transformed data{
    real initial_time = 0.0;
    int T = 10;
    array[T] real times = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
}

transformed parameters {
    # Initial ODE values
    real inventory_initial = 2 + 2 * 10000;
    real expected_order_rate_initial = 10000;
    real work_in_process_inventory_initial = 8 * max(0,10000 + 2 + 2 * 10000 - 2 + 2 * 10000 / 8);

    vector[3] initial_outcome;  # Initial ODE state vector
    initial_outcome[1] = inventory;
    initial_outcome[2] = expected_order_rate;
    initial_outcome[3] = work_in_process_inventory;

    vector[3] integrated_result[T] = ode_rk45(vensim_ode, initial_outcome, initial_time, times, minimum_order_processing_time, inventory_adjustment_time);
}

parameters{
    real inventory_adjustment_time;
    real minimum_order_processing_time;
}

model{
    inventory_adjustment_time ~ normal(0, 1);
    minimum_order_processing_time ~ normal(0, 1);
}

The problem is how we're going to expose vector[3] integrated_result[T] to the user. There are 2 ways the user would want to access it. 1. along the time axis(which results in a array of length T with a single stock) 2. for a single timestep(which results in a vector of length 3)

Another problem is linking the codegen with data specified by the user. I'm not sure what form the data would have to be inputted from the user. If data was specified, we'd have to construct the data block that matches the inputted data.

Lingua principale
Jupyter Notebook
Stelle
3
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyunjimoon/DataInDM

Tutte le issue di hyunjimoon/DataInDM

Issue simili

Altre issue su Data Engineering

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.