mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix: fix slice init length
Signed-off-by: dropbigfish <fillfish@foxmail.com>
This commit is contained in:
parent
cff7103ece
commit
9d581adc04
|
@ -440,9 +440,9 @@ for t in 1 .. n:
|
|||
return argmax(alpha[t,si] over si)
|
||||
*/
|
||||
func hmm(y_t []float64, x_t []float64, l int) float64 {
|
||||
al := make([]float64, l)
|
||||
an := make([]float64, l)
|
||||
as := make([]float64, l)
|
||||
al := make([]float64, 0, l)
|
||||
an := make([]float64, 0, l)
|
||||
as := make([]float64, 0, l)
|
||||
long := 0.
|
||||
neut := 0.
|
||||
short := 0.
|
||||
|
@ -453,9 +453,9 @@ func hmm(y_t []float64, x_t []float64, l int) float64 {
|
|||
sin := make([]float64, 3)
|
||||
sis := make([]float64, 3)
|
||||
for i := -1; i <= 1; i++ {
|
||||
sil = append(sil, x_t[n-1-1]*transitProbability(i, j))
|
||||
sin = append(sin, x_t[n-1-1]*transitProbability(i, j))
|
||||
sis = append(sis, x_t[n-1-1]*transitProbability(i, j))
|
||||
sil = append(sil, 0, x_t[n-1-1]*transitProbability(i, j))
|
||||
sin = append(sin, 0, x_t[n-1-1]*transitProbability(i, j))
|
||||
sis = append(sis, 0, x_t[n-1-1]*transitProbability(i, j))
|
||||
}
|
||||
if j > 0 {
|
||||
_, longArr := floats.MinMax(sil, 3)
|
||||
|
|
Loading…
Reference in New Issue
Block a user