Package weka.core

Examples of weka.core.Instance


   */
  @Override
  public Set<ReasonerAdapter> select() {
    Set<ReasonerAdapter> selectedSet = new HashSet<ReasonerAdapter>();
   
    Instance instance = translator.getInstance(this.ontoProperties, this.ontology, this.query);
    String selectedReasonerName = predict(instance);
   
    System.out.println("Selected Reasoner: " + selectedReasonerName);
   
    for(ReasonerAdapter reasoner: reasoners){
View Full Code Here


    return ontologyAnalyser.getFeatures(ontology);
  }
 
  public Instance getInstance(Properties ontoProperties, OWLOntology ontology, Query query){
    List<String> featureList = getFeatures(ontoProperties, ontology, query);
    Instance instance = new Instance(featureList.size() + 1);
    instance.setDataset(dataset);
    for(int i = 0; i < featureList.size(); i ++){
      Attribute attr = instance.attribute(i);
      if(attr.isNumeric()){
        instance.setValue(i, Double.valueOf(featureList.get(i)));
      }else{
        instance.setValue(i, featureList.get(i));
      }
    }
    return instance;
  }
View Full Code Here

        {
          try
          {
            int []comparisonResults = new int[dataCollector.getInstanceLength()];
            dataCollector.fillInPairDetails(comparisonResults,p, nonNegPairs);
            Instance instance = dataCollector.constructInstance(comparisonResults, true);
            double distribution[]=classifier.distributionForInstance(instance);
            long quality = obtainMeasureOfQualityFromDistribution(distribution,classTrue);
            if ( quality >= 0 )// && p.getScore() > 0)
            {
              possibleResults.add(new PairScore(p.getQ(), p.getR(), p.getScore(), quality));
View Full Code Here

        // potentially meaningful pair, check with the classifier
        try
        {
          int []comparisonResults = new int[dataCollector.getInstanceLength()];
          dataCollector.fillInPairDetails(comparisonResults,p, pairs);
          Instance instance = dataCollector.constructInstance(comparisonResults, true);
          double distribution[]=classifier.distributionForInstance(instance);
          long quality = obtainMeasureOfQualityFromDistribution(distribution,classFalse);
          if ( quality > 0 )
          {
            if (pairBestToReturnAsRed == null || quality >pairBestToReturnAsRed.getAnotherScore())
View Full Code Here

        {// meaningful pairs, check with the classifier
          try
          {
            int []comparisonResults = new int[dataCollector.getInstanceLength()];
            dataCollector.fillInPairDetails(comparisonResults,p, pairs);
            Instance instance = dataCollector.constructInstance(comparisonResults, true);
            double distribution[]=classifier.distributionForInstance(instance);
            long quality = obtainMeasureOfQualityFromDistribution(distribution,classTrue);
            if ( quality >= 0 )
            {
              sum+=quality;
View Full Code Here

        {// meaningful pairs, check with the classifier
          try
          {
            int []comparisonResults = new int[dataCollector.getInstanceLength()];
            dataCollector.fillInPairDetails(comparisonResults,p, pairs);
            Instance instance = dataCollector.constructInstance(comparisonResults, true);
            double distribution[]=classifier.distributionForInstance(instance);
            long quality = obtainMeasureOfQualityFromDistribution(distribution,classTrue);
            if ( quality >= 0 )
            {
              sum+=quality;
View Full Code Here

        {
          try
          {
            int []comparisonResults = new int[dataCollector.getInstanceLength()];
            dataCollector.fillInPairDetails(comparisonResults,p, nonNegPairs);
            Instance instance = dataCollector.constructInstance(comparisonResults, true);
            double distribution[]=classifier.distributionForInstance(instance);
            long quality = obtainMeasureOfQualityFromDistribution(distribution,classTrue);
            if ( quality >= 0 )// && p.getScore() > 0)
            {
              possibleResults.add(new PairScore(p.getQ(), p.getR(), p.getScore(), quality));
View Full Code Here

        // potentially meaningful pair, check with the classifier
        try
        {
          int []comparisonResults = new int[dataCollector.getInstanceLength()];
          dataCollector.fillInPairDetails(comparisonResults,p, pairs);
          Instance instance = dataCollector.constructInstance(comparisonResults, true);
          double distribution[]=classifier.distributionForInstance(instance);
          long quality = obtainMeasureOfQualityFromDistribution(distribution,classFalse);
          if ( quality > 0 )
          {
            if (pairBestToReturnAsRed == null || quality >pairBestToReturnAsRed.getAnotherScore())
View Full Code Here

        {// meaningful pairs, check with the classifier
          try
          {
            int []comparisonResults = new int[dataCollector.getInstanceLength()];
            dataCollector.fillInPairDetails(comparisonResults,p, pairs);
            Instance instance = dataCollector.constructInstance(comparisonResults, true);
            double distribution[]=classifier.distributionForInstance(instance);
            long quality = obtainMeasureOfQualityFromDistribution(distribution,classTrue);
            if ( quality >= 0 )
            {
              sum+=quality;
View Full Code Here

        {
          try
          {
            int []comparisonResults = new int[dataCollector.getInstanceLength()];
            dataCollector.fillInPairDetails(comparisonResults,p, nonNegPairs);
            Instance instance = dataCollector.constructInstance(comparisonResults, true);
            double distribution[]=classifier.distributionForInstance(instance);
            long quality = obtainMeasureOfQualityFromDistribution(distribution,classTrue);
            if ( quality >= 0 )// && p.getScore() > 0)
            {
              possibleResults.add(new PairScore(p.getQ(), p.getR(), p.getScore(), quality));
View Full Code Here

TOP

Related Classes of weka.core.Instance

Copyright © 2018 www.massapicom. 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.