algebra-club / TaguPy

MIT License
1 stars 0 forks source link

[Feat] Create Multinomial Simulator #16

Open takesei opened 3 years ago

takesei commented 3 years ago

Overview

Description

Class Multinominalの継承元

Class Multinominalのロジック

Figure

図1coef: np.ndarrayの例 (n_factor=3, n_out=2, max_dim=2)

c_nは, それぞれn番目のcoefficietを表す. x_iはそれぞれの要素の数値を表す

output_name c1 c2 c3 c1 x c2 c1 x c3 c2 x c3
y1 1 2 -1 0.03 0 -0.02
y2 3 -2 2 0 -0.35 0

資料2 データ生成のアルゴリズム

図1なようなcoefテーブルとなったとき, 各のoutput, y1, y2は同じ行に存在する値の数字を参照しながら以下のように与えられる

もし今回, x1 = 10, x2 = 5, x3 = 10 が与えられたとした場合,

このとき, exmatrixの行情報はそれぞれの要員をどれくらい入れるかの情報のため, 行ごとにみた時に [In] exmatrixの一行: 要員の値 → [Out] retmatrixの一行: y1, y2の値 となる

takesei commented 3 years ago

忘れてました, 誤差項(Normal(x | 0, σ^2))いれてください, 追記しますね

takesei commented 3 years ago

multinominalではなくてmultinomialでした, 修正します