func TestLearn64PatternA_5(t *testing.T) { if testing.Short() { t.SkipNow() } rand.Seed(1979) ds := segment.NewDendriteSegment(64) ds.Reset(1, 3, 5, 8, 13, 21) patternA := data.NewBitset(64) patternA.Set(2, 4, 22, 24, 42, 44, 62) TryToLearn(t, 80, ds, 5, *patternA) t.Log(ds) }
func TestLearn64PatternAB_5(t *testing.T) { if testing.Short() { t.SkipNow() } rand.Seed(1979) ds := segment.NewDendriteSegment(64) ds.Reset(1, 3, 5, 8, 13, 21) patternA := data.NewBitset(64) patternA.Set(2, 4, 22, 24, 42, 44, 62) patternB := data.NewBitset(64) patternB.Set(22, 23, 24, 25, 26) TryToLearn(t, 90, ds, 5, *patternA, *patternB) t.Log(ds.Connected()) }
func NewColumn(inputSize, height int) *Column { result := &Column{ active: data.NewBitset(height), predictive: data.NewBitset(height), proximal: segment.NewDendriteSegment(inputSize), learning: -1, learningTarget: 0, distal: make([]*segment.DistalSegmentGroup, height), } for i := 0; i < height; i++ { result.distal[i] = segment.NewDistalSegmentGroup() } return result }