Normalize function of matlab

조회 수: 10 (최근 30일)
AMIR KHAN
AMIR KHAN 2021년 9월 4일
댓글: AMIR KHAN 2021년 9월 4일
I am trying to normalize my data and using matlab's normalize() function. I want the normalized data, center and scalar values as the output. But when I am simulating it is saying "too many output arguments." But I have seen from the page https://uk.mathworks.com/help/matlab/ref/double.normalize.html and using the same way. Kindly, see the screenshot.
  댓글 수: 1
AMIR KHAN
AMIR KHAN 2021년 9월 4일
Thanks a lot. I want to normalize the test set from same mean and std as that of train set. Is there any function for that?

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

채택된 답변

Walter Roberson
Walter Roberson 2021년 9월 4일
In your release, only the one-output form of normalize() was available.
The three-output form is new as of R2021a.
  댓글 수: 3
Walter Roberson
Walter Roberson 2021년 9월 4일
c = mean(Xs);
s = std(Xs);
Xs = normalize((Xs-c) ./ s);
and then use the same s and c for all other datasets you want to center and scale the same way.
AMIR KHAN
AMIR KHAN 2021년 9월 4일
Thanks

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by