How can I use the PREMNMX function within the Neural Networks Toolbox to scale my data between 0 and 1, rather than -1 and 1?
조회 수: 7 (최근 30일)
이전 댓글 표시
I would like to use the PREMNMX function within Neural Networks Toolbox to scale my data between 0 and 1, rather than -1 and 1.
채택된 답변
MathWorks Support Team
2011년 2월 28일
This can be achieved by scaling the data returned from the PREMNMX function. For example, if you want the data in the vector "X" to be scaled between 0 and 1, rather than -1 and 1, use the following code:
x = premnmx(X);
y = (x+1)/2
In general, if you want the data in "X" to be scaled between "a" and "b", use the generalized code:
x = premnmx(X);
y = (x+1)*(b-a)/2+a
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!