INNER CODE UNIT · Go

TestChain_TransitionProbability

mb-14/gomarkov · gomarkov_test.go:102

func TestChain_TransitionProbability(t *testing.T) {
	type args struct {
		next    string
		current NGram
	}
	tests := []struct {
		name    string
		chain   []byte
		args    args
		want    float64
		wantErr bool
	}{
		{
			"Simple transition positive",
			[]byte(`{"int":1,"spool_map":{"^":0,"Test":1,"$":2},"freq_mat":{"0":{"1":1},"1":{"2":1}}}`),
			args{next: "Test", current: NGram{"^"}},
			1,
			false,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…