Hide random values from matrix
이전 댓글 표시
hi all
i have matrix A (8x9):
A = [0,2,0,0,1,2,0;3,0,4,5,0,0,1;0,0,2,0,3,0,0;0,5,0,3,0,0,2;4,0,1,0,4,5,0;0,2,0,0,4,0,0;3,0,0,0,0,0,2;3,0,1,1,2,1,3]
i have to find mean absolute error. for which i have to hide 10% values from this matrix and then find those values using algorithm and then find out its MAE. How can i can hide random values from the matrix? As actual matrix is quite large.
댓글 수: 5
Walter Roberson
2018년 3월 11일
"i have to hide 10% values from this matrix and then find those values using algorithm"
Do I understand correctly that you need to somehow "hide" 10% of the values and then using only the other 90% of the information, restore the missing values?
Tha saliem
2018년 3월 11일
Jan
2018년 3월 11일
It depends on what "hiding" means. Do you want to set them to NaN, Inf or 0? Do you want to remove 10% of the columns, or rows, or arbitrary 10% of the elements and reforming the result to a new matrix - if so, which shape should if have? If the number of rows or columns or elements is not a multiple of 10, how do you want to round the wanted 10%?
Reading your question, i cannot guess what "using algorithm and then find out its MAE" means. Which algorithm and what is "MAE"?
Tha saliem
2018년 3월 11일
John D'Errico
2018년 3월 11일
Hiding means absolutely whatever you want it to mean.
It is you who needs to design the algorithm, and write the code. So you are the one who needs to design the algorithm, and chose how to flag or indicate which values are hidden. There is no magical tool in MATLAB to "hide" a number in an array.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!