フィルターのクリア

Data preprocessing in ANNs

3 ビュー (過去 30 日間)
Hassanean
Hassanean 2017 年 2 月 6 日
コメント済み: Hassanean 2017 年 2 月 15 日
Hi, Please, could I get on helps to write a correct code' to scaling and normalizing the input data with interval [0.1-0.9] that are used as input data to neural network in matlab. regards
  1 件のコメント
Hassanean
Hassanean 2017 年 2 月 15 日
Dear Shashank thanks in advance for your respond. This scaling function can deal with vector matrix at one raw, in case of I have 6 raws in input matrix,please, how can solve that?

サインインしてコメントする。

採用された回答

Shashank
Shashank 2017 年 2 月 15 日
In general, you can get a new variable in the range [a,b] using:
x_new = (b-a)*((x-min_x)/(max_x-min_x))+a;
Here min_x and max_x represent the minimum and maximum values of the original data and x is the value you are trying to convert.
For example, Let's say I have an array i=[1 2 3 4] which I want to scale and normalize to an interval [0.1 0.9], i can do so by using the following code snippet
i=[1 2 3 4];
i_min=min(i);
i_max=max(i);
a=0.1; %for range [0.1 0.9]
b=0.9;
i_new = (b-a)*((i-i_min)./(i_max - i_min)) + a
i_new=
0.1000 0.3667 0.6333 0.9000

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by