AIMA.Core.Learning.Inductive.DLTest.matches C# (CSharp) Méthode

matches() public méthode

public matches ( Example e ) : bool
e AIMA.Core.Learning.Framework.Example
Résultat bool
        public bool matches(Example e)
        {
            foreach (String key in attrValues.Keys)
            {
                if (!(attrValues[key].Equals(e.getAttributeValueAsString(key))))
                {
                    return false;
                }
            }
            return true;
            // return e.targetValue().Equals(targetValue);
        }

Usage Example

Exemple #1
0
 public void testDLTestMatchFailsOnMismatchedExample()
 {
     DataSet ds = DataSetFactory.getRestaurantDataSet();
     Example e = ds.getExample(0);
     DLTest test = new DLTest();
     test.add("type", "Thai");
     Assert.IsFalse(test.matches(e));
 }
All Usage Examples Of AIMA.Core.Learning.Inductive.DLTest::matches