  In today's era, a tremendous amount of data is generated by different
observatories and manual classification of data is something which is
practically impossible. Hence, to classify and categorize the objects there are
multiple machine and deep learning techniques used. However, these predictions
are overconfident and won't be able to identify if the data actually belongs to
the trained class. To solve this major problem of overconfidence, in this study
we propose a novel Bayesian Neural Network which randomly samples weights from
a distribution as opposed to the fixed weight vector considered in the
frequentist approach. The study involves the classification of Stars and AGNs
observed by XMM Newton. However, for testing purposes, we consider CV, Pulsars,
ULX, and LMX along with Stars and AGNs which the algorithm refuses to predict
with higher accuracy as opposed to the frequentist approaches wherein these
objects are predicted as either Stars or AGNs. The proposed algorithm is one of
the first instances wherein the use of Bayesian Neural Networks is done in
observational astronomy. Additionally, we also make our algorithm to identify
stars and AGNs in the whole XMM-Newton DR11 catalogue. The algorithm almost
identifies 62807 data points as AGNs and 88107 data points as Stars with enough
confidence. In all other cases, the algorithm refuses to make predictions due
to high uncertainty and hence reduces the error rate.
