Package edu.uci.jforestsx.dataset

Examples of edu.uci.jforestsx.dataset.Feature


          bestGain = currentGain;
        }
      }
    }

    Feature feature = curTrainSet.dataset.features[split.feature];
    split.threshold = feature.upperBounds[bestThreshold];
    split.originalThreshold = feature.getOriginalValue(split.threshold);
   
    RegressionTreeSplit regressionSplit = (RegressionTreeSplit) split;
    regressionSplit.leftOutput = bestSumLeftTargets / bestWeightedLeftCount;
    regressionSplit.rightOutput = (regHistogram.sumTargets - bestSumLeftTargets) / (histogram.totalWeightedCount - bestWeightedLeftCount);
View Full Code Here


    int node = 0;
    while (node >= 0) {
      int split = splitFeatures[node];
      assert(split < features.length);
      Feature feat = features[split];
      if(feat.upperBounds[feat.bins.get(0)] <= thresholds[node]) {
        node = leftChild[node];
      } else {
        node = rightChild[node];
      }
View Full Code Here

          decisionSplit.leftTargetDist[c] = leftTargetDist[c];
        }
      }
    }

    Feature feature = curTrainSet.dataset.features[split.feature];
    split.threshold = feature.upperBounds[bestThreshold];
    split.originalThreshold = feature.getOriginalValue(split.threshold);

    for (int c = 0; c < numClasses; c++) {     
      decisionSplit.rightTargetDist[c] = decisionHistogram.targetDist[c] - decisionSplit.leftTargetDist[c];
    }
   
View Full Code Here

  private void makeFeatures() {
    System.out.print("Making features...");
    timer.start();
    features = new Feature[featureCount];
    for (int f = 0; f < featureCount; f++) {
      features[f] = new Feature();
      features[f].bins = bins[f];
      features[f].upperBounds = valueDistributions[f];
      features[f].setName(featureAnalyzer.getFeatureName(f + 1));
      features[f].setMin(featureAnalyzer.min[f]);
      features[f].setMax(featureAnalyzer.max[f]);
View Full Code Here

    NumericArray[] bins,
    int featureCount) {

    Feature[] features = new Feature[featureCount];
    for (int f = 0; f < featureCount; f++) {
      features[f] = new Feature();
      features[f].bins = bins[f];
      features[f].upperBounds = valueDistributions[f];
    }
    return features;
  }
View Full Code Here

  }

  private Feature readFeature(int featureSize, NumericArrayType type) throws Exception {
    byte[] buf = new byte[featureSize];
    read(buf, 0, featureSize);
    Feature feature = new Feature();
    feature.bins = NumericArrayFactory.createNumericArray(type, targets.length);
    feature.loadFromByteArray(buf, 0);
    return feature;
  }
View Full Code Here

TOP

Related Classes of edu.uci.jforestsx.dataset.Feature

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.