Neural Networks, a simple counter [closed] - neural-network

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Is it possible to create an ANN, which takes some data in the output just increments some counter? For example, every pass would increase the number given by a binary representation using 4 output neurons. I remember reading that the output should be same given the same input. So is that possible?

I don't think this is actually possible if one sticks to the original notion of a neural network, which is a composition of functions, each taking a weighted sum of the outputs of the previous layer as an input and producing a singe output value. The weights are usually trained to reproduce the known outputs on certain input values. The backpropagation algorithm I believe you are referring to updates the weights in a certain fashion, and the idea of making one of the weights work as a counter doesn't really make any sense.

Related

using singular value decomposition (svd) in quadratic regression [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
In order to do a quadratic regression on a rather large data set I would like to solve the following equation using svd(singular value decomposition):
B(nx1)=A(nx3)*X(3x1)
I am thinking to use matlab for that, any tips? the goal is to compute matrix X
It seems that what you call quadratic regression is actually the minimal square error regression. In this case the computation is very easy:
1) Multiply both left sides by A'(3xn) arriving to
A'(3xn)B(nx1) = A'(3xn)A(nx3) X(3x1)
2) Now multiply both left sides by the inverse of A'(nx1) A(nx3) arriving to
inv(A'(3xn)A(nx3))A'(3xn)B(nx1) = X(3x1)
3) Now use svd to evaluate the inverse above, see Most efficient matrix inversion in MATLAB
See also Minimizing error of a formula in MATLAB (Least squares?)

How to estimate next values on Matlab [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a vector of values corresponding to the measured data and I want to predict the next values. How can I do that? I know that is possible with Kalman filter but it might be an easier way to do. Here is a plot of the data and I want to predict next values:
Try exponential smoothing, e.g., double exponential smoothing or Holt-Winters method. Basically you try to learn the trend of the data.
I have some sample python code in this post.
On the other hand, if you know the movement/observation model of the underline variable, for sure, kalman will give you much better predictions as #tomasz74 pointed out.

Sparse matrix storage space [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need to get the storage size of sparse matrix in amount of double numbers. I need to get this information in runtime.
you can use the command whos to get the space used by a variable.
http://www.mathworks.fr/fr/help/matlab/ref/whos.html
whos var_name
info=whos('var_name');
The nonzero elements are stored, alongside with their row indices, so
nnz(x);
is a good approximation, as it returns the number of nonzero elements.
If your sparse matrix is getting unexpectedly big, you can check nnz to keep track of a bug which may result in overwriting a lot of zero elements.
So the effectiveness of using sparse matrices can be also measured with
s=size(m_sparse);
effectiveness = 1 - nnz(x)/(s(1)*s(2))

Coding k-means algorithm in MATLAB [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Could you help me to write matlab simple code for k-means algorithm without using the algorithm in matlab toolbox ? So i want to work with array and plot the clusters with unique colors. For example i have an array=[1 2; 3 4 ; 5 6] with 2 clusters; some points will be red some points are blue at the end the program should plot the array in axis. then using the k-means algorithm. at the end. plot clusters in graphical interface.
can you help me?
If you want to see how MATLAB does it, type
edit kmeans
into the command window. This might give you some hints.
An easier place to start would probably be the wikipedia page, which has the basic algorithm succinctly outlined.

my proj is based on WSN.. its in MATLAB [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
i hav created a network.. i hav to calculate energy of all the nodes n this energy should get reduced as n when the node senses ..... plszz help me out in the energy part...
Unfortunately your post is a bit confusing, maybe you should reformulate it as a question. If I understood correctly you are trying to simulate a Wireless Sensor Network in Matlab.
If you need handling of sensing events and reducing the energy (battery charge) of certain nodes, you can use Matlab classes and events.
http://www.mathworks.com/help/techdoc/ref/brk7uzk.html#brpeid9
If you need to calculate and minimize the energy usage and you know the positions of all nodes, you just need to calculate the minimum spanning tree, where the edge weights are the distances between the nodes.
There are lots of resources and algorithms on the net, e.g.
http://www.people.vcu.edu/~gasmerom/MAT131/mst.html