public PredictForMat ( PredictType predictType, Array data, int startIteration, int numIteration ) : double[] | ||
predictType | PredictType | |
data | Array | |
startIteration | int | |
numIteration | int | |
return | double[] |
/// <summary> /// Evaluates the native LightGBM model on the given feature vector /// </summary> /// <param name="predictType"></param> /// <param name="row"></param> /// <returns></returns> public double [] Evaluate(Booster.PredictType predictType, float[] row, int startIteration, int numIteration) { if (Booster == null) { throw new Exception("Model has not been trained"); } var rslt = Booster.PredictForMat(predictType, row, startIteration, numIteration); return(rslt); }
public void GetOutput(ref VBuffer <float> features, ref TOutput prob) { var output = Booster.PredictForMat(Booster.PredictType.Normal, features.Values, MaxNumTrees); prob = ConvertOutput(output); }
public void GetOutput(ref VBuffer <float> features, ref TOutput prob, int startIteration, int numIterations) { var output = Booster.PredictForMat(Booster.PredictType.Normal, features.Values, startIteration, (numIterations == -1) ? MaxNumTrees : numIterations); prob = ConvertOutput(output); }