How is the prediction speed, in the regression learner, calculated?
4 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1259645/image.png)
I would like to use this metric to meassure and compare some of my models which I have made using TreeBagger and/or fitrensemble. If there is any way of doing this already within the function please let me know. Any help is appriciated. Thank you
0 件のコメント
採用された回答
Drew
2023 年 1 月 17 日
編集済み: Drew
2023 年 1 月 17 日
The short answer is that Regression Learner uses the tic and toc commands around the model "predict" method call/s on the validation data.
Assume this results in a time of t seconds for prediction of n observations. This implies n/t observations are predicted per second. So, you can use this same method to measure the prediction time at the command line.
In practice, the reported elapsed time will vary depending on the time required to load the models and methods for prediction, other computation on the machine, etc.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Regression Tree Ensembles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!