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!