cmaclell / concept_formation

Python implementations of TRESTLE, COBWEB/3, and COBWEB
MIT License
61 stars 18 forks source link

Ensure that the categorize operation is working properly. #55

Open cmaclell opened 7 years ago

cmaclell commented 7 years ago

Currently it looks like _cobweb_categorize (in cobweb.py) is always going all the way to a leaf, rather than stopping at intermediate nodes.

Double check that this behavior is correct.

Also, check that categorize is doing the right thing when no predictive power for an instance is gained by going to the child (does it stop? or keep categorizing?).

cmaclell commented 5 years ago

There may be situations where this is actually desirable. Mainly, going all the way to a leaf might be useful for implementing Labyrinth or something.

cmaclell commented 5 years ago

Also, maybe we should go all the way to a leaf, then when making predictions decide which concept in the entire path to use for prediction.

cmaclell commented 5 years ago

So it looks like we just always go to the best leaf, all the way down the tree. See: https://github.com/cmaclell/concept_formation/blob/6610391ddb2844734d4b0b8baff92bc6c67e2777/concept_formation/cobweb.py#L203-L216

cmaclell commented 5 years ago

I think this makes sense for categorization, in that we can't create anything new, so we just find the best concept to put it in.. however, this never stops at an intermediate node.