java.lang.Object
org.elasticsearch.xpack.core.ml.inference.trainedmodel.ShapPath

public class ShapPath extends Object
Ported from https://github.com/elastic/ml-cpp/blob/master/include/maths/CTreeShapFeatureImportance.h Path struct
  • Constructor Details

    • ShapPath

      public ShapPath(ShapPath parentPath, int nextIndex)
    • ShapPath

      public ShapPath(ShapPath.PathElement[] elements, double[] scale)
  • Method Details

    • extend

      public int extend(double fractionZero, double fractionOne, int featureIndex, int nextIndex)
    • sumUnwoundPath

      public double sumUnwoundPath(int pathIndex, int nextIndex)
    • unwind

      public int unwind(int pathIndex, int nextIndex)
    • fractionOnes

      public double fractionOnes(int pathIndex)
    • fractionZeros

      public double fractionZeros(int pathIndex)
    • findFeatureIndex

      public int findFeatureIndex(int splitFeature, int nextIndex)
    • featureIndex

      public int featureIndex(int pathIndex)