Hide random values from matrix
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 11 de Mzo. de 2018
"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
el 11 de Mzo. de 2018
Jan
el 11 de Mzo. de 2018
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
el 11 de Mzo. de 2018
John D'Errico
el 11 de Mzo. de 2018
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!