public bool IsCover(LearnableExample example) { foreach (var attribute in example.PredictiveAttributes) { if (_type.Equals(attribute.Type)) { return(_value.Equals(attribute.Value)); } } return(false); }
public bool IsCover(LearnableExample example) { if (_members.Count == 0) { return(true); } switch (_operation) { case Operation.Neg: { return(!_members[0].IsCover(example)); } break; case Operation.Con: { foreach (var member in _members) { if (!member.IsCover(example)) { return(false); } } return(true); } break; case Operation.Dis: { foreach (var member in _members) { if (member.IsCover(example)) { return(true); } return(false); } } break; } return(false); }
public override bool Equals(object obj) { LearnableExample otc = obj as LearnableExample; return(otc != null && (_predictiveAttributes.Equals(otc.PredictiveAttributes) && _decisiveAttribute.Equals(otc.DecisiveAttribute))); }
public LearnableExample(LearnableExample sample) { _predictiveAttributes = new List <AttributeValue>(sample.PredictiveAttributes); _decisiveAttribute = sample.DecisiveAttribute; }
public ExaminableExample(LearnableExample example, AttributeValue value = null) : base(example) { SetValue(value); }