I am trying to model Ip adress to cretae a fraud detection framework. So I am wondering if Ip Adress is a continuous or discrete or categorical variable. Bests
-
4$\begingroup$ Could you explain why the answer would matter? $\endgroup$– whuber ♦Commented Apr 6, 2016 at 15:09
-
$\begingroup$ To Model this variable and do PCA $\endgroup$– FishCommented Apr 6, 2016 at 15:15
-
$\begingroup$ I'm afraid that "model this variable" tells us practically nothing. If you're contemplating PCA, then you must have other variables, too, and their characteristics could matter. It sounds like you need to amplify your question if you would like to get useful answers. $\endgroup$– whuber ♦Commented Apr 6, 2016 at 15:40
-
$\begingroup$ I'm not sure how do you want to apply PCA over IP addresses. Can you detail more? $\endgroup$– DaLCommented Apr 7, 2016 at 5:22
-
$\begingroup$ Yes , I would like to do PCA, but I think it is not possible for Ip adress as a discrete variable. Any idea? $\endgroup$– FishCommented Apr 8, 2016 at 2:58
1 Answer
IP addresses are discrete. There is finite number of IP addresses and there are no useful meaning to adding and subtraction of IP addresses.
Having said that, you can define similarity between IP addresses. I simple example of similarity is to split the addresses into internal addresses vs. external addresses. You can go further and assign higher similarity to IPs belonging to the same subnet.
Please be aware that IP similarity definition might be very complex and problem dependent. For example, in many cases you are not interested in the country associated to IP. The complex similarity make it difficult to use it in algorithms in a straight forward way.