[−][src]Function oner_induction::discover
pub fn discover<A, C>(
attributes: &ArrayView<A, Ix2>,
classes: &ArrayView<C, Ix1>
) -> Option<(usize, Rule<A, C>)> where
A: Eq + Hash + Clone + Debug,
C: Eq + Hash + Clone + Debug,
Find the one rule that fits a set of example data points.
Arguments
attributes
- rows containing attribute values as columns.classes
- the true classification for each row.
Result
The result is a tuple containing the column index the best rule applies to,
and the Rule
itself.
The Rule
consists of:
- the attribute index (from zero) that the rule works for; and
- the
Case
s for that attribute.
A Case
is a value for the attribute and the corresponding predicted class.