The calculation needs to consider the number of branches. The number of branches is the number of features that have at least one child. Current implementation considers all features including the leaf features which have not any branch.
This may be correct if we consider leaf features to have a branching factor of zero, but in that case all feature models would return an average branching factor less than 1.
Two examples:
Moreover, current implementation returns always 0 or 1 because the value is rounded, but this should return a float.
Anyway, first, I think we need to clarify the definition of the operation.
Is there a paper reference for a formal definition of this operation?
I suggest the following implementation that considers the number of branches, as well as a precision for the floating point result:
The calculation seems to be incorrect.
The calculation needs to consider the number of branches. The number of branches is the number of features that have at least one child. Current implementation considers all features including the leaf features which have not any branch.
This may be correct if we consider leaf features to have a branching factor of zero, but in that case all feature models would return an average branching factor less than 1. Two examples:
Moreover, current implementation returns always 0 or 1 because the value is rounded, but this should return a float.
Anyway, first, I think we need to clarify the definition of the operation. Is there a paper reference for a formal definition of this operation?
I suggest the following implementation that considers the number of branches, as well as a precision for the floating point result: