how to assign weightage
古いコメントを表示
suppose i have a matrix x and the second row has values ranging from 0.2 to 102 and weightage has to be assigned to these depending on the mean. the values close to the mean should have highest weightage and progressively decrease as it goes farther.
20 件のコメント
madhan ravi
2018 年 11 月 12 日
give an example and your desired output
johnson saldanha
2018 年 11 月 12 日
johnson saldanha
2018 年 11 月 12 日
johnson saldanha
2018 年 11 月 12 日
Stephen23
2018 年 11 月 12 日
Not difficult at all, but what function should the weighting have? Linear down to some minimum value? Logarithmic? Square root? Some other function?
Walter Roberson
2018 年 11 月 12 日
What is to be done with the first row of the matrix?
johnson saldanha
2018 年 11 月 12 日
johnson saldanha
2018 年 11 月 12 日
Walter Roberson
2018 年 11 月 12 日
The values start from the first row but you have only defined processing the second row. Should we just discard the first row?
johnson saldanha
2018 年 11 月 12 日
johnson saldanha
2018 年 11 月 12 日
Walter Roberson
2018 年 11 月 12 日
Okay what should be done with the first column?
johnson saldanha
2018 年 11 月 12 日
johnson saldanha
2018 年 11 月 12 日
Walter Roberson
2018 年 11 月 12 日
sort() on abs(x-mean(x)) and take the second output of sort to tell you the order.
johnson saldanha
2018 年 11 月 12 日
Walter Roberson
2018 年 11 月 12 日
[sorted_distance, sort_order] = sort(abs(x-mean(x))) ;
johnson saldanha
2018 年 11 月 12 日
Walter Roberson
2018 年 11 月 12 日
You said that the values closest to the mean should have the highest weight . sorted_distance tells you exactly how far values are from the mean, arranged in increasing distance . sort_order tells you what the original order was. For example if the first entry of sorted_distance is 0.063 and the first entry of sort_order is 19 then that tells you that the entry that was closest to the mean was aa distance of 0.063 from the mean and that it was the 19th row in the original data that had that entry .
Now it is up to you to decide how a particular distance from the mean shold be transformed into a weight .
johnson saldanha
2018 年 11 月 13 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Detection についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!