-1
我怎樣才能實現這一點:如何設置規模和大小np.random.exponential
庫存損失誤差建模爲 時間間隔之間發生的更新過程。時間間隔基於股票損失事件之間的平均時間(TBSLE)的指數 分佈。庫存損失發生的頻率是TBSLE的倒數。平均庫存損失量的預期值可以估計爲 2.05。
我試圖像這樣實現它,但我不知道如何設置指數規模和大小,或者如果這種方法是正確的。
def stockLossError(self):
stockLossErrorProbability = 0
inverseLambda = 0.5
errors = 0
randomnumber = np.random.exponential(inverseLambda,none)
if(randomnumber > stockLossErrorProbability):
self.daysSinceLastError += 1
self.errors += 2.05
謝謝你,現在我有一個更好的瞭解指數函數是如何工作的! – fumo21