Skip to content

Speed of Random Forest predictions #179

Closed
@mjmckp

Description

@mjmckp

I trained a FastForestBinaryClassifier on a toy model with two features and zero input transformations, and found that calling the Predict method on the resulting model takes about 5ms for a single input on a high spec machine. This seems quite slow, shouldn't it take less than 1ms?

I notice that the FastTreePredictionWrapper type is able to write itself out as code:

public void SaveAsCode(TextWriter writer, RoleMappedSchema schema)

Would it be possible to write out the calibrated model as C# code, which should presumably be faster to run? This would have the additional benefit of being able to be included as a static model which can be deployed without any ML.Net dependencies...

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions