이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
how to assign weightage
조회 수: 1 (최근 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에서 Loops and Conditional Statements에 대해 자세히 알아보기
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 (한국어)