現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
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.
johnson saldanha
2018 年 11 月 12 日
im sorry. i havent understood how its related to my problem statement
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!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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 (한국어)