필터 지우기
필터 지우기

Find R square with different length vectors

조회 수: 7 (최근 30일)
Vinicio Moya
Vinicio Moya 2021년 8월 6일
댓글: Vinicio Moya 2021년 8월 8일
Hello!
I have two vectors, first with 50 elements and second with 3000 elements. Second vector is a Gompertz Function modeling of the first, and I need to calculate the R2, but in all the functions that I found the problem is I need two same size vectors... Can you help me?

채택된 답변

Image Analyst
Image Analyst 2021년 8월 6일
You can't as far as I know. You can only correlate the 50 "test" data values with the 50 corresponding modeled versions of them -- those same values run through the model. How did you even get the other 250 input values to do the model on?
  댓글 수: 3
Image Analyst
Image Analyst 2021년 8월 6일
If you make up additional fitted values, you can't correlate them. For example if I have an (x1, y1) and (x2, y2) and get a line between them, and now I get 1000 points in between x1 and x2 and get fitted y values, I can't correlation those additional 1000 y values to anything because they don't exist. Only y1 and y2 exist. So you could correlate yFit1 and yFit2 to y1initial and y2initial, but not y(2) - y(999) of the fitted data because there is no corresponding y values to correlate against.
Vinicio Moya
Vinicio Moya 2021년 8월 8일
ok, I get it... Thanks!!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by