Prediction of Asteroid Diameter With The Help of Multi-Layer Perceptron Regressor

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

International Journal of Advances in Electronics and Computer Science, ISSN(p): 2394-2835 Volume-6, Issue-4, Apr.

-2019
http://iraj.in
PREDICTION OF ASTEROID DIAMETER WITH THE HELP OF
MULTI-LAYER PERCEPTRON REGRESSOR
VICTOR BASU

Computer Science and Engineering Jalpaiguri Government Engineering College West Bengal, India
E-mail: [email protected]

Abstract - Predicting the diameter of an asteroid with help of artificial neural network technique. We have used Multilayer
Perceptron Regressor algorithm to estimate the diameter of the asteroid with higher accuracy and least error.

I. INTRODUCTION researches about the asteroid.


There are many methods used to estimate the
In this research paper, we are going to discuss how diameter or size of the asteroids, the latest technique
the concept of artificial neural network could be that is used by space scientists to estimate the size of
utilized to estimate the diameter of an asteroid. In this the asteroid is through absolute magnitude(H) and
research, we have used the Multilayer Perceptron geometric albedo(a) where diameter(d) is considered
algorithm as the base algorithm to predict the as a function of (H) and (a).The dataset which I have
diameter. We have used different algorithms to test used in this research is officially maintained by
and evaluate the performance of the model with the JPL(Jet Propulsion Laboratory) of NASA, and the
same dataset but Multilayer Perceptron algorithm database is based on the observations made through
performed best in these type of situations with higher NASA telescopes. But when we analyzed that we
ac- curacy and least error while prediction. The found out that there are 646785 rows where the
dataset is we have used is officially maintained by diameter is not specified out of 786226 rows.
NASA Jet Propulsion Laboratory. In this dataset we Although we were not able to find out any valid
have considered all types of asteroids such as reason for which the diameters in these cases were
asteroids which are grouped as Near Earth not calculated. The main objective of this research is
Objects(NEO), Potentially Hazardous Objects(PHA), to show that it possible to estimate the diameter of
we have also considered all the possible asteroid an asteroid with the power of artificial neural
orbitclasses as mentioned in the official website of network.
JPL(Jet Propulsion Laboratory). The columns of the
dataset also contain all the physical and basic B. Implementation details
properties of an asteroid. We have used Mean We have used python as the programming language to
Absolute Error, Mean Squared Error,Median implement the model. The libraries which we have
Absolute Error, Explained Variance Score and R2- basically used in python are numpy and pandas for
Score as metrics to evaluate and compare the data analysing, sklearn for pre-processing, importing
performance of different regression algorithm against regressor algorithm and model evaluation, matplotlib
the same dataset. The R2-Score which we have and seaborn for data visualization.
achieved through Multilayer Perceptron is
0.9665626238, along with it we have achieved C. Dataset Description
Explained Variance Score of 0.9665631410, the Mean The dataset consists of 786226 rows and 22
Absolute Error for this model is 0.4306106593, Mean columns. The columns consists of orbital details of
Squared Error is 3.3754211434 and Median Absolute the asteroid like semi-major axis(a),eccentricity(e),
Error is0.2242921644. inclination(i), perihelion distance(q), condition code
of orbit, orbital period and num- ber of observations
II. MODEL IMPLEMENTATION WITH THE used, aphelion distance(Q). The column also consist
HELPOF MULTILAYER PERCEPTRON of some basic characteristics of asteroids like it is
REGRESSOR ALGORITHM physically hazardous or not(PHA), it falls under near
earth object or not (NEO), its absolute magnitude(H),
A. Why did we choose the diameter of an asteroid geo- metric albedo value(albedo).The whole dataset
as the target parameter is available in official website of NASA’s Jet
The diameter of an asteroid is one the most important Propulsion Laboratory[6].
physical parameter of an asteroid, it is used to D. Dataset Pre-Processing
calculate many other physical and basic parameters of Although the dataset is very well defined still
the asteroids like calculating the rotation period of there are certain faults in the dataset which were
asteroid, and also used to detect if an asteroid is needed to be corrected to create a better regressor
potentially hazardous or not if it is found to be a Near model. As it is been mentioned above that there are
Earth Object. The diameter is also used in many other 646785 rows in which diameter is not mentioned. So
Prediction of Asteroid Diameter with the Help of Multi-Layer Perceptron Regressor

36
International Journal of Advances in Electronics and Computer Science, ISSN(p): 2394-2835 Volume-6, Issue-4, Apr.-2019
http://iraj.in
we have removed those rows from the dataset, we
have also removed those rows in which albedo value
is missing. Missing values of absolute magnitude(H)
is filled with the mode of the entire column of ”H”.
Columns like “condition_code”, ”neo”, ”pha” are
transformed from object type to integer type.
Columns like ”extent”,
”rot_per”,”n_del_obs_used”,”n_dop_obs used” were
also removed from the dataset because almost eighty
percent of the data were missing from these columns.

E. Data Visualizations
All the visualizations are done with seaborn library in
python. The visualization made form the dataset
indicates relationship between different parameters of
an asteroid.
Fig. 4. Scatter plot between asteroid MOID and absolute
magnitude(H)

F. Model Implementation and its Detailed


Description
Machine Learning algorithms are designed to learn
from data for a given situation and predict result for
an unknown data from similar type of situation.
These algorithms are also used to solve Regression
problems.
For estimation of the diameter of an asteroid we have
used MultiLayer Perceptron Regeressor as the base
Supervised learning algorithm. Now let us discuss
Fig. 1. Correlation matrix heatmap of preprocessed dataset why did we choose MultiLayer Perceptron algorithm
as the base algorithm to predict the diameter of an
asteroid in outer space. There are certain metrics
based on which we evaluate the performance of a
model. Some of the metrics are discussed below
which we have used in this research to evaluate and
compare different model performances are discussed
below.
 Mean Absolute Error - It is the mean of the
absolute value of each difference between
actual value and predicted value for that
instance on all instance of the testdataset.
 Mean Squared Error - It is the average of
squared error that is used as the loss function
for least squared regression.
Fig. 2. Scatter plot between asteroid diameter and absolute
magnitude(H)  Median Absolute Error - It is the median of
all absolute difference between the target and
predicted value.
 Explained variance score - It is a measure
how far observed value differ from the average
of predicted value.
 r2 Score - It is known as coefficient of
determination. It is a statistical measure of
how close are the data fitted to the regression
line.
Here we have used mean_absolute_error,
mean_squared _error,median_absolute_error,
explained_variance_score, r2 _score from
sklearn.metrics to evaluate mean absolute error,
Fig.3. Joint plot between asteroid geometric albedo and mean squared error, median absolute error, variance
absolute magnitude(H) score and r2 score respectively.

Prediction of Asteroid Diameter with the Help of Multi-Layer Perceptron Regressor

37
International Journal of Advances in Electronics and Computer Science, ISSN(p): 2394-2835 Volume-6, Issue-4, Apr.-2019
http://iraj.in
Analysis of different algorithm for prediction of  Explained Variance Score :0.9332152304
diameter of an asteroid and finally comparing them  r2-Score :0.9332148418
with MultiLayer Perceptronalgorithm:-
Before fitting and evaluating the model we have also AdaBoost Regressor - It is a boosting algorithm
pre-processed the training and test data with which boosts the performance of the base estimator
MaxAbsScaler algorithm, which is imported from model. It is a meta-estimator that begins by fitting a
sklearn.preprocessing. This estimator scales and regressor on the original dataset and then fits
translates each feature individually such that the additional copies of the
maximal absolute value of each feature in the training regressor on the same dataset and the weights of
set will be 1.0. It does not shift/center the data, and instances are adjusted according to the error of the
thus does not destroy any sparsity. current prediction. To implement it we have imported
Gradient Boosting Regressor - Gradient boosting is AdaBoost Regressor from sklearn.ensemble. Here the
a machine learning technique for regression and ’base estimator’ which is the base estimator from
classification problems, where it works on reducing which the boosted ensemble is built is taken as a
error sequentially. It builds an additive model in a Decision Tree Regressor which is imported from
forward stage wise manner. To implement it we have sklearn.trees and in this Decision Tree Classifier we
imported Gradient Boosting Regressor from have set ”max_features” to ”auto”, ”max_depth”
sklearn.ensemble. We have used ”huber” as the loss which is the maximum depth of the tree is set to 30.
function to be optimized. ”max_features” is set to In AdaBoost
”auto” which means max features = n_features. Regressor ”n_estimators” is set to 100, ”loss”
”learning rate” is set to 0.4. ”warm_start” is set to function is set to ”exponential” and ”learning_rate” is
”True” as a result the regressor model to reuse the set to 0.5. Model evaluation in case of AdaBoost
solution of the previous call to fit and add more Regressor is given below.
estimators to the ensemble. Model evaluation in case  Mean Absolute Error:0.4111519233
of Gradient Boosting Regressor is given below.  Mean Squared Error : 6.3205563183
 Mean Absolute Error:0.4607025067  Median Absolute Error :0.1960000000
 Mean Squared Error : 6.8237488992  Explained Variance Score :0.9373877402
 Median Absolute Error :0.2290790857  r2-Score :0.9373877184
 Explained Variance Score :0.9324036603
 r2-Score :0.9324030249 MultiLayer Perceptron Regressor - It is basically
based on the concept of artificial neural networks. It
XGBoost Regressor - It is an extreme gradient utilizes back propagation for training, this model
boosting algorithm. To implement it we have optimizes the squared- loss using stochastic gradient
imported XGB Regressor from xgboost. We have set descent. To implement it we have imported
”n estimators” which is the number of trees in a forest MLPRegressor from sklearn.neural network. It has a
to 1000. Model evaluation in case of XG Boosting linear activation function in all neurons which is
Regressor is given below. a linear function which maps the weighted inputs
to the output of each neuron, here it is set to ”tanh”,
 Mean Absolute Error:0.4164732536 the hyperbolic tan function, returns f(x) =
 Mean Squared Error : 5.3267230111 tanh(x).”max_iter” which is the maximum number of
 Median Absolute Error :0.2137639141 iterations is set to 1000 and ”warm start” is set to
 Explained Variance Score :0.9472328399 ”True”. Model evaluation in case of MLP Regressor
 r2-Score :0.9472327649 is given below.
 Mean Absolute Error:0.4306106593
Random Forest Regressor - It is a meta estimator  Mean Squared Error : 3.3754211434
that fits a number of classifying decision trees on  Median Absolute Error :0.2242921644
various sub-samples of the dataset and uses averaging  Explained Variance Score :0.9665631410
to improve the predictive accuracy and control over-  r2-Score :0.9665626238
fitting. To implement it we have imported Random From the above observations taken we could
Forest Regressor from sklearn.ensemble. Here conclude that the MultiLayer Perceptron algorithm
”n_estimators” is set to 100, ”warm_start” is set to performs the best in this case. Therefore we came up
”True”, ”oob_score” is set to ”True” to use out-of- with the result that MultiLayer Perceptron algorithm
bag samples to estimate the r2 on unseen data. Model should be the base supervised learning algorithm to
evaluation in case of Random Forest Regressor is predict the diameter of an asteroid.
given below. G. Visualization of Model performance with the
 Mean Absolute Error:0.4040615222 help of Residual Plot
 Mean Squared Error : 6.7417979790 X-axis indicates the Predicted value and Y-axis
 Median Absolute Error :0.2009400000 indicates the Residual value, Residual value =
Actual value - Pre- dicted value
Prediction of Asteroid Diameter with the Help of Multi-Layer Perceptron Regressor

38
International Journal of Advances in Electronics and Computer Science, ISSN(p): 2394-2835 Volume-6, Issue-4, Apr.-2019
http://iraj.in

Fig. 5. Residual Plot for Gradient Boosting Regressor

Fig. 9. Residual Plot for MLP Regressor

H. How does MultiLayer Perceptron algorithm


works?
A MultiLayer Perceptron is a feed forward artificial
neural network that maps a set of input data into a set
of appropriate data. It consists of minimum three
layers the input layer, the output layer and the hidden
layer. The hidden layers could be one or more. Each
node of a layer is connected with certain weight wijto
every node of its frontal layer except the output layer.
In order to activate a neuron in the leading layer the
summation of the product of Activation value of the
Fig. 6. Residual Plot for XGBoost Regressor neurons in the preceding layer and Weight connecting
to the neuron in the leading layer must be greater than
activation value of the target neuron.

L indicates a particular layer of neurons.


Here the threshold activation value each neuron
− would be between 1 and 1, So we need a Activation
Function to squeeze the value between -1 and 1.
Here we have used tan has the activation function. It
is also sigmoidal

Fig. 7. Residual Plot for Random Forest Regressor

Where, b is a bias, which indicates how high the


weighted sum needs to be before the neurons get
meaningfully active. Therefore the process of
activating neurons flows from input layer to inner
layer. Activation of neuron in a layer highly depends
on the behavior of all the neurons in the preceding
layer.

MLP uses the technique of backpropagation for


training. Learning occurs by changing the connecting
weights after each iteration based on the amount of
Fig. 8. Residual Plot for AdaBoost Regressor error in output com- pared to the expected result.

Prediction of Asteroid Diameter with the Help of Multi-Layer Perceptron Regressor

39
International Journal of Advances in Electronics and Computer Science, ISSN(p): 2394-2835 Volume-6, Issue-4, Apr.-2019
http://iraj.in
Total error for each output neuron, ACKNOWLEDGEMENT

This research is successful all due to Jet Propulsion


Lab- oratory of NASA for maintaining such a
Where, t is the target value and y is the value wonderful dataset. The information present in the
produced by the perceptron. Now we need to upgrade dataset was the main reason for the success of the
the weights wij using gradient descent, ∆wij is added research. Nowadays space scientists and astronomers
to the old weight, and the product of the learning rate are constantly trying hard to know more about these
and the gradient, multiplied by −1 to decrease the asteroids, their characteristics, are they a risk to earth
value of C with each iteration. or not ? So these scientists and astronomers are also a
source of inspiration behind this research project.
∂C
∆wij = ̶ η
∂w ij
REFERENCES
I. Device used to compute the model and evaluate List of references which helped us a lot throughout
it the research are given below:
We have implemented everything on a machine,
whose configurations are given below, [1] E.R. Buhrke; J.L. LoCicero.1992.”A learning algo- rithm for
Processor: Intel(R) Core(TM)i5-5200U CPU: 2.20 multi-layer perceptron networks with non-differentiable
GHz nonlinearities”. [Proceedings 1992] IJCNN International Joint
Conference on Neural Networks.
System Type: 64-bit Operating System, x64-based [2] Gurpreet Singh; Manoj Sachan.2014.”Multi-layer per-
processor ceptron (MLP) neural network technique for offline
Operating System: Windows 8.1 pro handwritten Gurmukhi character recognition”. 2014 IEEE
International Conference on Computational Intelligence and
Computing Research.
CONCLUSION [3] Mehrshad Salmasi; H. Mahdavi-Nasab; H. Pourghas-
sem.2011.”Comparison of Multilayer Perceptron and
Space researches could proceed further with the help Generalized Regression Neural Networks in Active Noise
of machine learning algorithms. Here we accept Control”. 2011 Third Pacific-Asia Conference on Circuits,
Communications and System(PACCS).
MultiLayer Perceptron algorithm to be the best to [4] T. Yidirim; H.K. Cigizoglu.2002.”Comparison of gen-
tackle these types of a problem after all types of eralized regression neural network and MLP performances on
evaluation. The model which has been discussed in hydrologic data forecasting”. Proceedings of the 9th
this paper could be improved further with higher International Conference on Neural Information Processing,
2002.ICONIP ’02.
scores and accuracy and less errors with the help of
[5] M.L. Vaughn; J.G. Franks.2003.”Explaining how a multi-
other machine learning algorithm or with advanced layer perceptron predicts helicopter airframe load spectra
processing technique to pre-process data or through from continuously valued flight parameter data”. Proceedings
deep learning. of the International Joint Confer- ence on Neural
Networks,2003.
[6] https://ssd.jpl.nasa.gov/sbdb_query.cgi



Prediction of Asteroid Diameter with the Help of Multi-Layer Perceptron Regressor

40

You might also like