Package weka.core

Examples of weka.core.Instance.stringValue()


      Instance instance = instEnum.nextElement();
      Assert.assertEquals("false",instance.classAttribute().value((int) instance.value(instance.classAttribute())));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertEquals(WekaDataCollector.ONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));

      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[2]));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[3]));   
    }
   
    {// pairE - incorrect pair, compared only with D
      Instance instance = instEnum.nextElement();
View Full Code Here


      Assert.assertEquals("false",instance.classAttribute().value((int) instance.value(instance.classAttribute())));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertEquals(WekaDataCollector.ONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));

      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[2]));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[3]));   
    }
   
    {// pairE - incorrect pair, compared only with D
      Instance instance = instEnum.nextElement();
      Assert.assertEquals("false",instance.classAttribute().value((int) instance.value(instance.classAttribute())));
View Full Code Here

    }
   
    {// pairE - incorrect pair, compared only with D
      Instance instance = instEnum.nextElement();
      Assert.assertEquals("false",instance.classAttribute().value((int) instance.value(instance.classAttribute())));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertEquals(WekaDataCollector.MINUSONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));

      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[2]));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[3]));// this should perhaps return ONE but we are effectively comparing floating-point values by equality so the outcome is not ceertain 
    }
View Full Code Here

   
    {// pairE - incorrect pair, compared only with D
      Instance instance = instEnum.nextElement();
      Assert.assertEquals("false",instance.classAttribute().value((int) instance.value(instance.classAttribute())));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertEquals(WekaDataCollector.MINUSONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));

      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[2]));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[3]));// this should perhaps return ONE but we are effectively comparing floating-point values by equality so the outcome is not ceertain 
    }
   
View Full Code Here

      Instance instance = instEnum.nextElement();
      Assert.assertEquals("false",instance.classAttribute().value((int) instance.value(instance.classAttribute())));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertEquals(WekaDataCollector.MINUSONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));

      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[2]));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[3]));// this should perhaps return ONE but we are effectively comparing floating-point values by equality so the outcome is not ceertain 
    }
   
    Assert.assertFalse(instEnum.hasMoreElements());
  }
View Full Code Here

      Assert.assertEquals("false",instance.classAttribute().value((int) instance.value(instance.classAttribute())));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertEquals(WekaDataCollector.MINUSONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));

      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[2]));
      Assert.assertEquals(WekaDataCollector.ZERO,instance.stringValue(testClassifier.attributesOfAnInstance[3]));// this should perhaps return ONE but we are effectively comparing floating-point values by equality so the outcome is not ceertain 
    }
   
    Assert.assertFalse(instEnum.hasMoreElements());
  }
 
View Full Code Here

      Assert.assertFalse(instance.hasMissingValue());
      Assert.assertTrue(instance.classAttribute().isNominal());
      Assert.assertEquals(2,instance.classAttribute().numValues());// true/false
      Assert.assertEquals("true",instance.classAttribute().value((int) instance.value(instance.classAttribute())));
 
      Assert.assertEquals(WekaDataCollector.MINUSONE,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertTrue(testClassifier.attributesOfAnInstance[0].isNominal());
      Assert.assertEquals("REL statechum score",testClassifier.attributesOfAnInstance[0].name());
 
      Assert.assertEquals(WekaDataCollector.ONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));
      Assert.assertTrue(testClassifier.attributesOfAnInstance[1].isNominal());
View Full Code Here

 
      Assert.assertEquals(WekaDataCollector.MINUSONE,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertTrue(testClassifier.attributesOfAnInstance[0].isNominal());
      Assert.assertEquals("REL statechum score",testClassifier.attributesOfAnInstance[0].name());
 
      Assert.assertEquals(WekaDataCollector.ONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));
      Assert.assertTrue(testClassifier.attributesOfAnInstance[1].isNominal());
      Assert.assertEquals("REL statechum compatibility score",testClassifier.attributesOfAnInstance[1].name());
    }
   
    {// pairC - incorrect pair
View Full Code Here

      Assert.assertFalse(instance.hasMissingValue());
      Assert.assertTrue(instance.classAttribute().isNominal());
      Assert.assertEquals(2,instance.classAttribute().numValues());// true/false
      Assert.assertEquals("false",instance.classAttribute().value((int) instance.value(instance.classAttribute())));
 
      Assert.assertEquals(WekaDataCollector.ONE,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertTrue(testClassifier.attributesOfAnInstance[0].isNominal());
      Assert.assertEquals("REL statechum score",testClassifier.attributesOfAnInstance[0].name());
 
      Assert.assertEquals(WekaDataCollector.MINUSONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));
      Assert.assertTrue(testClassifier.attributesOfAnInstance[1].isNominal());
View Full Code Here

 
      Assert.assertEquals(WekaDataCollector.ONE,instance.stringValue(testClassifier.attributesOfAnInstance[0]));
      Assert.assertTrue(testClassifier.attributesOfAnInstance[0].isNominal());
      Assert.assertEquals("REL statechum score",testClassifier.attributesOfAnInstance[0].name());
 
      Assert.assertEquals(WekaDataCollector.MINUSONE,instance.stringValue(testClassifier.attributesOfAnInstance[1]));
      Assert.assertTrue(testClassifier.attributesOfAnInstance[1].isNominal());
      Assert.assertEquals("REL statechum compatibility score",testClassifier.attributesOfAnInstance[1].name());
    }
   
    Assert.assertFalse(instEnum.hasMoreElements());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.