how to assign weightage
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
johnson saldanha
2018-11-12
the example is the same. the values ranging from 0.2 to 102 in randomn order. totally there are more than 1000 values. the highest is 102 and lowest is 102. the mean is 67. the weightage should be given to these values. the weightage should be highest for the values close to the mean. it is okay if the values are put in bins and weightage is given depending the bins. the output should be such that 60-70 should have highest weightage and decrease as it goes farther.
johnson saldanha
2018-11-12
as there are many set of values where the values are constant, i need to give different weightage to each set
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?
johnson saldanha
2018-11-12
the weighing factor could be in terms of 0.1 to 0.9 where later i can multiplty the time for which the values are constant. i also need the time for which it is constant
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
my bad. im sorry. theres a correction in the question. it should be second column instead of second row
johnson saldanha
2018-11-12
discard it. i mean we have to access only the second column. and the description given is for the second column. thank you
Walter Roberson
2018-11-12
sort() on abs(x-mean(x)) and take the second output of sort to tell you the order.
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 .
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)