1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-26 13:49:14 +08:00

receiver name b should be consistent with previous receiver name c for ChiMergeFilter

This commit is contained in:
Niclas Jern 2014-07-18 13:55:17 +03:00
parent 8f154559f1
commit e714470814

View File

@ -45,16 +45,16 @@ func (c *ChiMergeFilter) Build() {
// AddAllNumericAttributes adds every suitable attribute
// to the ChiMergeFilter for discretisation
func (b *ChiMergeFilter) AddAllNumericAttributes() {
for i := 0; i < b.Instances.Cols; i++ {
if i == b.Instances.ClassIndex {
func (c *ChiMergeFilter) AddAllNumericAttributes() {
for i := 0; i < c.Instances.Cols; i++ {
if i == c.Instances.ClassIndex {
continue
}
attr := b.Instances.GetAttr(i)
attr := c.Instances.GetAttr(i)
if attr.GetType() != base.Float64Type {
continue
}
b.Attributes = append(b.Attributes, i)
c.Attributes = append(c.Attributes, i)
}
}