Answer the question
In order to leave comments, you need to log in
How to correctly apply an IP address to the input of the neural network?
For some network tasks of traffic classification, I want to submit an IP address to the input of the neural network.
However, the most obvious way is to saddle, normalize the dword32 representation of the IP address, is obviously wrong. In this case, the neural network will begin to compare addresses by value and will inevitably begin to draw conclusions from the distance between the addresses of the training sample . And this, in turn, is fundamentally wrong, since the distance between IP addresses in networks does not mean anything . Addresses that differ by several units may belong to different companies on different continents. And between 192.167.255.255 and 192.168.0.0, with a unit distance, there is also an abyss in the field of application.
It comes to mind to make input vectors of huge sizes from networks, for example, by mask /24, /16, AS number or other criteria and make inputs binary for belonging to one or another group of addresses. This should improve the logic of the task. But maybe there are other solutions? Surely, after all, someone has already described this problem and there is no need to reinvent the wheel. I would be grateful for a link to some article on the subject.
Answer the question
In order to leave comments, you need to log in
the most obvious way is to saddle, normalize the dword32 representation of the IP address, obviously wrongNot obvious. Because the neural network can solve different problems. What task your neural network will solve is unknown. Different tasks will require different representations of the address.
use the maxmiddb database, and feed the neural network not the IP itself, but information about geographic coordinates (do not forget that they are spherical, by the way, and they should be converted to a Cartesian system, taking the center of the earth as the origin), country, region, city, ASN (organization / provider) and something else can be
fished out by itself, the IP address of the neural network is unlikely to say anything
PS: please note that there are gaps in the database, for example, there will be no information about the region or city
the distance between IP addresses in networks means nothing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question