Neural network that learns patterns in very large matrices [closed] - matlab

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Suppose we have some large matrices that want to classify.
If matrices are MN, is it OK to have a neural network with MN neurons that is, for each element a neuron ? Is there any better idea? Actually, in my case, I have 50 matrices with 200 rows and 200 columns [ 200*200 ].
{The elements of input matrices are 0 and 1 }
Thank you in advance.

Find a suitable value for the number of hidden nodes, H, by trial and error.
Create numH*Ntrials plus An outer loop H = Hmin:dH:Hmax over number of hidden nodes and an inner loop i = 1:
Ntrials over number of random trn/val/tst data divisions and random weight initialization trials for each value of H.

Related

Random Number Generation for Continuously Decrementing Range [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
How can I create a matrix of a size 50 x 50 in MATLAB and each column vector of matrix i.e., 50 x 1 size must have random numbers within a given range and then range for the next column vectors must decrement by k until last column vector is reached?
A solution may be to generate two matrices:
A 50x50 matrix containing random values between 0 and 1
A 50x50 matrix containing the upper limits for each cell
The elementwise multiplication of both matrices should give you the desired matrix.

how to randomly select an element from an array having the least probability [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
how to randomly select an element from an array having the least probability in matlab
example :
A = [ 1,2,3,4,5,6]
P = [ 0.01,0.2,0.25.0.2,0.25,0.09] % probability %
Find all indices of the minimum probabilities. Then generate a random interger depending on the number of equally minimum probabilities. Then use matrix indexing to extract a random index of minimum probability and then its corresponding element.
[~, ind] = mink(P,2); %All indices of minimum elements
Result = A(inds(randi(numel(inds)))); %Random minimum element

Is there a Matlab function or codes to calculate SNRdB of 5D signal? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am doing a 5D data reconstruction from 5D noisy data. I am looking for any MATLAB codes or functions to calculate the SNR (in dB) in order to compare the noisy data with the original 5D data. Is there any way to do this using MATLAB?
Use: r = snr(x,y)
From Matlab documentation: r = snr(x,y) returns the signal-to-noise ratio (SNR) in decibels of a signal, x, by computing the ratio of its summed squared magnitude to that of the noise, y. y must have the same dimensions as x. Use this form when the input signal is not necessarily sinusoidal and you have an estimate of the noise.

Generate random matrix with specific values [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am new to MATLAB and I want to create a random n*n matrix containing just -1 OR 1 as values.
any help ?
I would use randi
% Generate random array of 0s and 1s, *2 and -1 to give random values -1 or +1
m = randi([0,1], n)*2-1
See also: introductory docs on random integers.
I typically use randi to generate the indexes of the numbers I am interested in. E.g. in your case you are interested in the numbers
a= [-1,1];
Thus we use
b = randi(length(a),2,2); %Generate matrix of size 2x2
to generate a random set of indexes. Finally we simply convert the indexes to the numbers of interest.
c = a(b); %Now a 2x2 matrix of -1, 1 numbers
A=rand(n);
thres=rand(1); % or whatever percentage
A=A>thres; % 1 and 0
A(A==0)=-1; % makes 0 -1

Random matlab matrix with at least .4 and at most .6 ones per column [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm creating a matrix in matlab of size n that contains only ones and zeros. The easiest way to do that is round(rand(m,n)) for a matrix of size mxn, but it creates in some cases rows that have all zeros or all ones. I want to put a lower and upper bound in the number of ones that each row has. Is there an easy way to do that?
Thanks
This is just for one column, but can easily be extended to a matrix:
v = zeros(m,1); % column
Fill the beginning of the column with at least 40% and at most 60% ones:
v(1: floor((0.4+(0.6-0.4)*rand())*(m+1))) = 1;
Shuffle the column:
v = v(randperm(numel(v)));