Artificial Neural Network with inputs having mix integers using MatLab?

3 views (last 30 days)
I'm trying to develop a neural network using Matlab which has integer as well as non integer inputs. How can we develop these type of network with mix integer inputs??

Accepted Answer

Walter Roberson
Walter Roberson on 29 Sep 2016
If the integers are in the range +/- 2^53 then use double() for them. If they are larger, up to 2^64-1, then you could have difficulty with the algorithms, which I suspect do not take special care to ensure that they preserve integer data types.
Is the actual question not about "integer" inputs, but instead about needing to treat something as discrete? For outputs, the usual trick is to round() the outputs that need to be integral.
Mixed integer programming is usually about reducing the state space of the inputs to bother passing to the objective function (possibly because it is only defined at integer values for those parameters.) But when you are using Neural Networks, you are typically presenting it with inputs that have already been created, and asking it to come up with some kind of model of those values. If you only ever pass the network integers for some values, the network isn't going to care. Unless you define custom transfer functions that evaluate an objective function inside them, you would not be asking to evaluate an objective function at mixed integer locations. I could see a potential difficulty if you are using a feedback (perhaps as part of a forecast network) where the outputs had to be partly integers; I do not at the moment know if that feedback function would have room to intervene with a round().
Or is the question about producing a network in which some of the weights were required to be integers? Even though for most purposes the weights are pretty much "black boxes", values that in isolation are not something you can usually put an interpretation to? A NN with two or more layers is, as Greg Heath says, a universal approximator -- but understanding the approximation is difficult.
I guess there would be room for the study of networks in which the weights were restricted to integers; you probably would not use standard transfer functions such as tansig() for such things.
  2 Comments
SHUAB KHAN
SHUAB KHAN on 30 Sep 2016
Thank you sir for your answer. But what type of neural network can be used here which uses integer type weights?
Walter Roberson
Walter Roberson on 30 Sep 2016
I do not know.
The references to integer weights I see at the moment have an emphasis on hardware implementation, but it does appear that people have worked through how to make them practical. See for example http://www.math.upatras.gr/~dgs/pdf/tr98-01.pdf
I do not know if anyone has implemented any of these in MATLAB.

Sign in to comment.

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!