Some interface design decisions regarding input data, outcome in data2draws

オープン
#22 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
data, tooling

調査の方向性

この issue では StanVensimModel、data2draws、および生成される Stan のデータブロックと transformed-data ブロックが挙げられていますが、リポジトリのファイルやテストは示されていません。これらのエントリーポイントをたどり、integrated_result とユーザーが提供したデータがどのように表現されているかを理解してください。完了の条件は、合意されたユーザー向けインターフェースと、それに対応する生成データブロックの動作が定まっていることです。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Jupyter Notebook
スター
3
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hyunjimoon/DataInDM のほかの issue

hyunjimoon/DataInDM の issue をすべて見る

似ている issue

Data Engineering の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。