Learn everything about Analytics

Home » Neural Networks Inside Internet Infrastructure

Neural Networks Inside Internet Infrastructure

This article was published as a part of the Data Science Blogathon.

Introduction

Data models are important in decision-making. Node.js programming can provide enough results for decisions through neural networking modules.

Brief Background:

The topic is internet infrastructure. There is a web of conceptual topics that binds into one collective theme. The main concepts involved here are Internet Protocol version four (IPv4) addresses and geographical registrars. Domain Name System (DNS) is also involved in the creation of internet infrastructure. More information can be found here.

IPv4 addresses are produced in four parts. In this scenario, IPv4 addresses are converted into decimal numbers with zero as placeholders. The American Registrar for Internet Numbers (ARIN) was chosen for this example.

 

Possible Benefit:

One primary benefit is to apply the concept of neural networks creatively and uniquely to an area that has not already been applied to on a regular basis.

Goal

This article is helpful to recognize different ways to apply statistics and other data analytical models in real-world situations.

What kind of real-world situations? You might ask. We already use neural networks for distinguishing images in automation. For example, to identify genetic anomalies or predict whether a patient is at risk of any such ailment such as cancer. Another application can include pictures of two figures and identify which figure should be labeled as one or another. For example, a human and a horse.

One other well-known example is MNIST where handwritten images are associated with a transcribed computer version. To elaborate, a picture of a number seven is converted into the number seven on an average keyboard Additionally, other mimicked human engagements and interactions can also include the ability to provide an autonomous driver where a vehicle is driving instead of a human.

Besides the applications listed above, the concept of this article can be applied to other areas that are constantly forgotten as time progresses. Internet infrastructure is a different topic where IPv4 addresses are linked to geographical directories and registrars. It is a unique concept from the previously mentioned topics listed above.

About this Article:

This article is helpful to recognize different ways to apply statistics and other data analytical models in real-world situations.

Here, a step-by-step run though is given to find probability in a true or false scenario. While providing a neural network algorithm with wide ranges of data is ideal, only a few inputs will be included for this algorithm to determine patterns. As more training data is included in the algorithm, the accuracy rate increases. Note, that few ranges of training data entries might not provide perfect accuracy scores. Another note to address is whenever the script is rerun, results will display differently each time. The concept of seeding is important if an individual would like to reproduce the same scores constantly.

Cross-validation was not explicitly included although test accuracy during the prediction stage was chosen as focal points in the tutorial. Also, training data was limited to a particular IPv4, a holistic approach would include the maximum and minimum numbers. However, the purpose might become benign if an IPv4 has been previously identified.

Prerequisites:

  • Any device with a completely downloaded version of Node.js.
  • The latest possible version of Node.js.
  • The installed version of brain.js.
  • Basic knowledge about data models, specifically Neural Networks.

This tutorial includes one module called Brain.js.

Once all prerequisites are met, the tutorial can commence.

To clarify what the following is about, the purpose is to determine the correlation between one IPv4 and a geographic registrar on a true or false basis.

Brain.js on Node.js

First, include brain.js into the Node.js script. As shown below.

global.brain = require('brain.js');

Partial output:

{
  activation: {
    leakyRelu: { activate: [Function: activate], measure: [Function: measure] },
    relu: {
      activate: [Function: activate$1],
      measure: [Function: measure$1]
},

global.net = new brain.NeuralNetwork();

Partial output:

    sigmoid: {
      activate: [Function: activate$2],
      measure: [Function: measure$2]
    },
    tanh: {
      activate: [Function: activate$3],
      measure: [Function: measure$3]
    }
  },
  CrossValidate: [Function: CrossValidate],

Second, enter IPv4 address training data.

net.train([
{ input: { a: 0.045, b: 0.088, c: 0.197, d: 0.212 }, output: { ARIN: 0 }},
{ input: { a: 0.045, b: 0.080, c: 0.255, d: 0.255 }, output: {ARIN: 0}},
{ input: { a: 0.045, b: 0.080, c: 0.0, d: 0.0 }, output: {ARIN: 0}},
{ input: { a: 0.045, b: 0.095, c: 0.255, d: 0.255 }, output: {ARIN: 0}},
{ input: { a: 0.045, b: 0.079, c: 0.0, d: 0.0 }, output: {ARIN: 1 }},
{ input: { a: 0.045, b: 0.079, c: 0.255, d: 0.255 }, output: {ARIN: 1 }},
{ input: {a: 0.099, b: 0.246, c: 0.067, d: 0.005}, output: {ARIN: 1 }}]);

Possibility of wrong scores:

{ error: 0.14603477910463694, iterations: 20000 }

Finally, enter a similar IPv4 address without range and unmentioned. 45.79.200.201 was chosen.

global.output = net.run({ a: 0.045, b: 0.079, c: 0.200, d: 0.201 });

Sample output:

{ ARIN: 0.6993367671966553 }

Neural Networks Inside Internet infrastructure.com

General Interpretations of Results and Conclusion:

Based on the results shown above, IPv4 45.79.200.201 is most likely owned by ARIN. To check, the whois directory indicates ARIN owns IPv4 45.79.200.201. With a probability score of more than 69%, this prediction was accurate. 50% is the split between true and false. Where more than 50% is likely and less than 50% is less likely.

Accuracy can also be judged on some prior knowledge that the chance of an IPv4 address could be transferred to another registrar. As mentioned before, if a range is excluded in training, a lower accuracy score will be displayed.

Possible Applications for the Future

To branch out of the provided version of internet infrastructure is the ability to find a critical path to increase speed for individuals trying to identify an association of IPv4 addresses to geographic locations. Although numerous resources are available for the time being, consistent identification of countries to IPv4 addresses is still vastly disproportionate.

As an addition to speed, the concept of providing results can incorporate more technical aspects such as ranking and relevance. For example, when looking up a keyword or a combination of words perhaps in a sentence, results are ranked in accordance with DNS attributes. Nonetheless, most advanced search engines have already understood and deployed this concept. However, Internet Service Providers (ISPs) can also play a role in terms of speed.

Takeaways:

A possible application of Neural networks can be implemented in a true or false scenario such as DNS connections.

Results help promote probable correlation rather than causation.

Most results offer an accuracy score that can be seen in two ways. One, the strength of correlation between input data and the final output. Two, a possible chance of an IPv4 address changing to another geographical registrar.

A score of more than 50% indicates a possibility of a correlation between input and output.

This article provided a basic interpretation of how neural networks can be applied. Additional options to apply data models to internet infrastructure are available.

The media shown in this article are not owned by Analytics Vidhya and is used at the Author’s discretion. 

You can also read this article on our Mobile APP Get it on Google Play