public class VariableImportances
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
double[] |
_importances |
java.lang.String[] |
_variables |
Constructor and Description |
---|
VariableImportances(java.lang.String[] variableNames,
double[] relativeImportances) |
Modifier and Type | Method and Description |
---|---|
protected static VariableImportances |
extractFromJson(com.google.gson.JsonObject modelJson) |
int |
numberOfUsedVariables() |
KeyValue[] |
topN(int n) |
public final java.lang.String[] _variables
public final double[] _importances
public VariableImportances(java.lang.String[] variableNames, double[] relativeImportances)
protected static VariableImportances extractFromJson(com.google.gson.JsonObject modelJson)
public KeyValue[] topN(int n)
n
- how many variables is in the output. If n >= number of variables or n <= 0 then all variables are returned.public int numberOfUsedVariables()