Artificial Neural Network with inputs having mix integers using MatLab?
2 次查看(过去 30 天)
显示 更早的评论
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??
0 个评论
采纳的回答
Walter Roberson
2016-9-29
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 个评论
Walter Roberson
2016-9-30
I do not know.
I find an interesting argument at https://petewarden.com/2015/05/23/why-are-eight-bits-enough-for-deep-neural-networks/
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.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!