필터 지우기
필터 지우기

How is the prediction speed, in the regression learner, calculated?

조회 수: 2 (최근 30일)
Samuel
Samuel 2023년 1월 11일
댓글: Samuel 2023년 1월 18일
The regression learner allows the user to visualize its prediction speed. My question is, how is this calculated?
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

채택된 답변

Drew
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.
  댓글 수: 1
Samuel
Samuel 2023년 1월 18일
Right, thank you for the clarification. I did try this approach but indeed, like you said yourself, I am noticing a varation oftentimes.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by