0% found this document useful (0 votes)
5 views

Gravitational wave signals from binary black hole collisions using G2NET_group_final

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Gravitational wave signals from binary black hole collisions using G2NET_group_final

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

GRAVITATIONAL WAVE SIGNALS FROM

BINARY BLACK HOLE COLLISIONS USING


G2NET

Submitted in partial fulfillment of the requirements for the degree of

BACHELOR OF TECHNOLOGY
in
Computer Science and Engineering

by

J.VAMSHI KRISHNA (18K91A0580)


GANGASANI VIDYA (18K91A0567)
KUMMARI MANOJ (18K91A05A5)
G.ROHITH YADAV (18K91A0563)

Under the guidance of


DR. A. SURESH RAO
PROFESSOR AND HEAD

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


TKR COLLEGE OF ENGINEERING AND TECHNOLOGY
(AUTONOMOUS)
(ACCREDITED BY NBA AND NAAC WITH ’A’ GRADE)
Medbowli, Meerpet, Saroornagar, Hyderabad-500097
DECLARATION BY THE CANDIDATE

We, Mr. J. VAMSHI KRISHNA bearing Hall Ticket Number 18K91A0580, Ms. GAN-
GASANI VIDYA bearing Hall Ticket Number 18K91A0567, Mr. KUMMARI MANOJ
bearing Hall Ticket Number 18K91A05A5, Mr. G. ROHITH YADAV bearing Hall Ticket
Number 18K91A0563, hereby declare that the main project report titled GRAVITATIONAL
WAVE SIGNALS FROM BINARY BLACK HOLE USING G2NET under the guidance
of DR. A. SURESH RAO, Professor and Head in Department of Computer Science and
Engineering is submitted in partial fulfillment of the requirements for the award of the degree
of Bachelor of Technology in Computer Science and Engineering.

Signature of the Candidate

Roll Number

Place: Meerpet

Date: dd/mm/yyyy
CERTIFICATE

This is to certify that the main project report entitled ”GRAVITATIONAL WAVE SIG-
NALS FROM BINARY BLACK HOLE COLLISIONS USING G2NET”, being submit-
ted by Mr. J. VAMSHI KRISHNA, bearing Roll No.: 18K91A0580, Ms. GANGASANI
VIDYA, bearing Roll Number: 18K91A0567, Mr. KUMMARI MANOJ, bearing Roll Num-
ber: 18K91A05A5,Mr. G.ROHITH YADAV, bearing Roll Number: 18K91A0563, in partial
fulfillment of requirements for the award of degree of Bachelor of Technology in Computer
Science and Engineering, to the TKR College of Engineering and Technology is a record of
bonafide work carried out by him/her under my guidance and supervision.

Name and Signature of the Guide Name and Signature of the HoD

Place: Meerpet

Date: dd/mm/yyyy
TABLE OF CONTENTS

ABSTRACT i
ACKNOWLEDGEMENTS ii
LIST OF FIGURES iii

1 INTRODUCTION 1
1.1 Motivation 1
1.2 Problem definition 2
1.3 Limitations of existing system 2
1.4 Proposed system 2

2 LITERATURE REVIEW 3
2.1 Review of Literature 3

3 REQUIREMENTS ANALYSIS 5
3.1 Functional Requirements 5
3.1.1 Data Collection 5
3.1.2 Model Creating 5
3.1.3 Model Training 5
3.1.4 Hyper parameter tuning 5
3.1.5 Model Evaluation 5
3.1.6 Model Deployed 5
3.2 Non-Functional Requirements 6
3.2.1 Usability 6
3.2.2 Reliability 6
3.2.3 Performance 6
3.2.4 Portabliity 6
3.2.5 Implementation 6
3.3 Software Requirement Specifications 6
3.3.1 Software Requirements 6
3.3.2 Hardware requirements 6

4 DESIGN 7
4.1 DFDs and UML diagrams 7
4.1.1 Data Flow Diagram 7
4.1.2 Sequence Diagram 8
4.1.3 Use Case Diagram 9
4.2 Algorithm 10

5 CODING 12
5.1 Pseudo Code 12

6 IMPLEMENTATION and RESULTS 17


6.1 Explanation of Key functions 17
6.1.1 Preprocess 17
6.1.2 Train 17
6.1.3 Test 17
6.1.4 Evaluate 17
6.1.5 Deploy 17
6.2 Method of Implementation 18
6.2.1 Input 18
6.2.2 Output Screens 18
6.2.3 Result Analysis 19

7 TESTING and VALIDATION 21


7.1 Design of Test Cases and Scenarios 21
7.1.1 Confusion matrix 21
7.2 Validation 22
7.3 Conclusion 24

8 CONCLUSION 25
REFERENCES 25
ABSTRACT

Gravitational waves are propagating fluctuations of gravitational fields, that is ‘ripples’


in space-time, generalized meaning by massively moving bodies. These waves stretch and
squeeze anything in their path as they pass by. A disturbance in the cosmos could cause
space-time to stretch, collapse and even jiggle like a mattress shaking that sleeper rolls over,
producing ripples of gravity. The strain gives the strength of the gravitational waves. These
waves from astrophysical sources when arriving at the earth are in terms of 10−21 .

Low-frequency waves are similar to other noises in the atmosphere. We need to eliminate noise
and isolate waves. This challenge in noise characterization could be solved with the help of
data science. As with the multi-disciplined approach to discovering GWs, additional expertise
will be needed to further GW. In particular, social and natural sciences have taken an interest
in machine learning, deep learning, classification problems, data mining, and visualization to
develop new techniques and algorithms to efficiently handle complex and massive data sets.
Machine learning and deep learning have emerged as a popular and powerful approaches for
solving problems in astrophysics. Machine Learning and Deep Learning Applications provide
fast and efficient methods for detector and signal characterization.

Keywords: Gravitational Wave, Astrophysical, Machine Learning, Deep Learning, Data


Mining.

i
ACKNOWLEDGEMENTS

The satisfaction and euphoria that accompanies the successful completion of any task
would be incomplete without the mention of the people who made it possible and whose en-
couragement and guidance have crowned my efforts with success.

I am indebted to the Internal Guide, Dr. A. Suresh Rao, Professor and Head, Dept. of
Computer Science and Engineering, TKR College of Engineering and Technology, for his/her
support and guidance throughout my Thesis/Dissertation.

I am also indebted to the Head of the Department, Dr. A. Suresh Rao, Professor,
Computer Science and Engineering, TKR College of Engineering and Technology, for his
support and guidance throughout my Thesis/Dissertation.

I extend my deep sense of gratitude to the Principal, Dr. D. V. Ravi Shankar, TKR
College of Engineering and Technology, for permitting me to undertake this Thesis/Dissertation.

Finally, I express my thanks to one and all that have helped me in successfully com-
pleting this Thesis/Dissertation. Furthermore, I would like to thank my family and friends for
their moral support and encouragement

J. VAMSHI KRISHNA (18K91A0580)


GANGASANI VIDYA (18K91A0567)
KUMMARI MANOJ (18K91A05A5)
G.ROHITH YADAV (18K91A0563)

Place: Meerpet

Date: dd/mm/yyyy

ii
LIST OF FIGURES

1.1 Binary Black Hole Merger 1


4.1 Data Flow Diagram of System 7
4.2 Sequence of System 8
4.3 Use Case Diagram of system 9
4.4 CNN Algorithm 11
6.1 Input Screen 18
6.2 Output Screen 19
6.3 Accuracy 19
6.4 Confusion matrix 20
6.5 Precision Recall curve 20
7.1 GUI Input Screen 23
7.2 GUI Output Screen 23
7.3 GUI Output Screen 24

iii
Chapter 1

INTRODUCTION

1.1 Motivation
Gravitational wave detection is crucial for two reasons: First, because gravity waves carry
information that is very different from that delivered by electromagnetic waves, their detec-
tion is predicted to open up a new window for observational astronomy. This new window
into the universe will enhance our understanding of the universe by allowing us to see the
fabric of space time around black holes, observe the formation of black holes or the merging
of binary systems consisting of black holes or neutron stars, search for rapidly spinning neu-
tron stars, delve into the very early moments of the universe’s origin, and peer into the very
centre of galaxies where supermassive black holes weighing millions of solar masses reside.
These are only a few of the major scientific breakthroughs expected in the first decade of the
twenty-first century. Second, detecting gravitational waves is critical for our understanding of
physics’ fundamental rules; proving the existence of gravitational waves will confirm a crucial
85-year-old prediction of general relativity.

Fig. 1.1: Binary Black Hole Merger

Einstein’s prediction that light and gravity waves travel at the same speed might also be
tested by comparing the arrival timings of light and gravitational waves from, say, super-
novae. Finally, we could check that they have the polarization that general relativity predicts.
Data science can be used to do the majority of the prepossessing for wave data. Data-related

1
challenges are becoming easier to tackle in an era of rising computer capacity. CNN has a
demonstrated track record with large data.

1.2 Problem definition


Gravitational signals are unimaginably tiny ripples in the fabric of space-time, GW detectors
are some of the most sensitive instruments on the planet to detect them. The strain of these
signals are negligible and buried in detector noise.Machine learning has emerged as a popular
and powerful approach for solving problems in astrophysics. Machine Learning Applications
provide fast and efficient methods for detector and signal characterization.

1.3 Limitations of existing system


Traditional methods will require the use of a detector to detect gravitational waves, and grav-
itational wave search methods will require manual intervention.Working in this manner is
laborious and time-consuming. The initial examination of waves that are repetitive jobs takes
a long period. The performance of present models is inadequate. Noise characterization and
classification of the wave is not efficient.

1.4 Proposed system


The system’s goal is to detect gravitational waves using data from three observatories at a
specific sampling rate and time span. The system will determine whether the data contains
wave or noise. The major purpose of this suggested system is to use deep learning techniques
to shorten the time it takes to detect waves. This system uses data from three observatories
as input, making it more reliable and resilient. This system use CNN to classify the existence
of waves after undergoing various preliminary transformations in order to detect waves with a
higher probability.

2
Chapter 2

LITERATURE REVIEW

2.1 Review of Literature


Gravitational waves from the merging of two stellar-mass black holes [1] have been detected
by the LIGO detectors The observed waveform is consistent with general relativity predictions
for the inspiral and merger of two black holes [4], as well as the ringdown of the resulting
single black hole.
The presence of binary stellar-mass black hole systems is demonstrated by these findings.
This is the first observation of a binary black hole merger and the first direct detection of
gravitational waves. The Michelson Laser Interferometer [8] inspired the LIGO instrument.
Due to minimal strain and noise in the system, detecting gravitational waves is difficult. To
verify gravitational waves with less effort, efficient search algorithms are applied. Machine
learning has become a common and powerful method for tackling astrophysics challenges.
The output of a GW detector is a time series of the detector strain, h. (t). Fundamental,
irreducible noise sources such as quantum noise in laser light, thermal noise in mirror coatings
and optic suspensions, and gravity gradient noise limit the sensitivity of an ideal detector. The
sensitivity of a real-world detector is limited by the inclusion of technical noise sources of
many origins, such as feedback control systems that are required to keep the systems working,
or instrumental and environmental disturbances. Non-stationary noise sources are widespread,
which means that their statistical characteristics shift with time.
Deep Convolutional Neural Networks (CNNs) [9] [7] have a lot of potential for glitch cat-
egorization using time-frequency representations. CNNs are algorithms that extract features
from 2D matrices, such as photographs, and utilise them to classify them. In order to classify
glitches, time-frequency transforms, Omega Scans, and Q-transforms are fed into a CNN-
based deep network. Reference [6] implements a 2D CNN-based image-based detection [3]
and classification pipeline.
We look at how data from ground-based gravitational wave detectors can be analysed us-

3
ing machine learning approaches. Techniques for enhancing the sensitivity of the Advanced
Laser Interferometer GW Observatory and Advanced Virgo GW searches, methods for swiftly
detecting the astrophysical properties of GW sources, and algorithms for decreasing and char-
acterisation of non-astrophysical detector noise, to name a few. These applications demon-
strate how machine learning techniques can be applied to enhance the science that current and
future GW detectors can accomplish. The data from LIGO and Virgo is non-stationary and
non-Gaussian. Machine learning techniques can increase the quality of these data.
With data from thousands of environmental and instrumental monitors, ML can be used to
predict the likelihood of a GW signal candidate being astrophysical or transient detector noise.
The cause of detector noise can be established by applying classification algorithms to distin-
guish distinct types of transient noise. As the sensitivity of ground-based GW interferometers
improves, the rate of detection of astrophysical events will increase, posing a challenge to
analyses that must cope with a huge number of events. The presence of terrestrial and instru-
mental glitches, which may increase with sensitivity, is the most significant stumbling barrier
in this endeavour.
This problem is likely to worsen over time as the density of events seen in the distant
cosmos with statistically lower SNRs grows. This cost can be greatly reduced by increasing the
fraction of actual occurrences in the list of potential triggers. Perhaps, in the future, machine
learning will assist us in increasing the dimension and volume of the parameter space for
astrophysical investigations. In this study, CNN algorithms were used to detect GW signals
from CBCs [2], through a binary classification with samples of non-Gaussian noise only and
samples of non-Gaussian noise plus GW injections.
We used a Morlet wavelet transform [5]to convert our time series vectors (strain data)
into time-frequency matrices, which was a crucial part of the data pre-processing (i.e., image
data). In addition, the created images were automatically decoded in the convolutional stacks
of our CNNs. Furthermore, the size of images in time-frequency format was lowered to the
point where all of our CNNs could be run efficiently on a single local CPU. The adoption of
a resampling white-box technique is a significant new addition to our study, which is moti-
vated by a desire to gain a statistically informed understanding of the uncertainties inherent in
CNN.With LIGO L1 data this model predicted accuracy of 82.5%

4
Chapter 3

REQUIREMENTS ANALYSIS

3.1 Functional Requirements


The system’s accuracy can be determined after These are the needs that the end-user expresses
as essential features that the system should provide. All of these functionalities must be in-
cluded in the system as part of the contract. The input to be provided to the system, the action
to be performed, and the expected output are all defined or described in this way. In con-
trast to non-functional needs, user-stated criteria can be seen immediately in the completed
product model evaluation. Each time we perform changes in the model, model evaluation is
performed.

3.1.1 Data Collection


The system requires appropriate data to train the model. It involves searching different
sources and gather data.

3.1.2 Model Creating


Analyzing the system and create a model for the problem. This is the phase before we start
training our dataset to model.

3.1.3 Model Training


After the dataset has been collected, the system requires model training.

3.1.4 Hyper parameter tuning


improve systems accuracy we need to perform hyper parameter tuning.

3.1.5 Model Evaluation


The system’s accuracy can be determined after model evaluation. Each time we perform
changes in the model, model evaluation is performed.

3.1.6 Model Deployed


Model is deployed after final evaluation and performance check.

5
3.2 Non-Functional Requirements
Describe user-visible aspects of the system that are not directly related to the functional be-
havior of the system. Non-Functional requirements include quantitative constraints, such as
response time (i.e. how fast the system reacts to user commands.) or accuracy.

3.2.1 Usability
Because the system is designed to be totally automated, there is no or minimal user inter-
vention.

3.2.2 Reliability
The system is more reliable because of the qualities that are inherited from the chosen
platform python.

3.2.3 Performance
The performance of this system is matched to current user requirements. The libraries
used in the system are optimized which gives better performance.

3.2.4 Portabliity
The system is portable because of python language which is a high-level general-purpose
language.

3.2.5 Implementation
The system is implemented in windows environment using Tkinter Library for GUI(Graphical
User Interface).Also using machine learning and deep learning to build model.

3.3 Software Requirement Specifications


3.3.1 Software Requirements
1.Python
2.Text editor

3.3.2 Hardware requirements


3.Laptop/ Personal Computer (PC)
4.Random Access Memory (RAM): 4 GB or above
5.Central Processing Unit (CPU): 3.10 GHz Processor and above
6.Operating System (OS): Windows 7 and above

6
Chapter 4

DESIGN

4.1 DFDs and UML diagrams


4.1.1 Data Flow Diagram
Data flow diagrams graphically represent the flow of data in a corporate information system.
DFD refers to the steps involved in moving data from the input to file storage and report pro-
duction in a system.

Fig. 4.1 Data Flow Diagram of System

7
4.1.2 Sequence Diagram
In the Unified Modeling Language (UML), a sequence diagram is a type of interaction
diagram that depicts how processes interact with one another and in what order.

Fig. 4.2 Sequence of System

8
4.1.3 Use Case Diagram
In the Unified Modeling Language, a use case diagram is a type of behavioural diagram
that is specified by and produced from a Use-case analysis (UML). Its purpose is to provide a
visual representation of a system’s functionality in terms of actors, goals (represented as use
cases), and any dependencies between those use cases. The main goal of a use case diagram
is to show which system functions are performed for which actor. It is possible to display the
roles of the system’s actors.

Fig. 4.3 Use Case Diagram of system

9
4.2 Algorithm
Convolutional Neural Network (CNN): CNN stands for ”convolutional neural network” and
refers to a neural network with several layers. It is a type of Deep Neural Network that is
mostly utilised for the processing of visual pictures. CNN has one input layer, one or more
middle layers, one or more completely connected layers, and finally an output layer. CNN
is being mistreated as a building element for our models. It works like this: the convolu-
tional layers apply a complex process to the input data, and the result is transmitted to the
next layer.This convolutional layer reacts in the same way as a human neuron reacts to vi-
sion. Every neuron in the convolution makes use of the data it gets and processes the data it
is in charge of. Although feed forward neural networks exist that can identify data based on
features, such systems cannot be used when processing film. Pooling layers with global or
local scope may be included in convolution systems. The pooling layer is one of the building
components that helps to lower the dimensionality of representation over time, resulting in a
significant reduction in computation complexity. It accomplishes this by clustering some neu-
rons from one layer together. Local pooling typically groups neurons in small groups, such as
2x2. Global pooling applies the process to every neuron. Layers that have complete associa-
tively consists of every single neuron from one layer connected to every single neuron from
another layer. This is sometimes also similar to the multi-layered neural network on funda-
mental level. The flattened grid or matrix undergoes changes through completely associated
layer for image classification.

10
Fig. 4.4 CNN Algorithm

11
Chapter 5

CODING

5.1 Pseudo Code


Here is the pseudo code of below system.
DECLARE input shape- input shape, : STRING
DECLARE input shapeMaxPooling2Dlayerfollowedbythat : STRING
DECLARE x- tf.ensure shape(x,input shape) : STRING
DECLARE input shape-(56,193,1) : STRING

tld- pd.read csv(”C:/sampled1/train/img labels.csv”)


train label dataset- tld[:92099]

train pathglob(’C:/sampled1/train/*/*/*/*’)

rind- train path[3].rindex(’\’) // last index where the character ’/’ appeared
extracted id for explore sample 3- train path[3][rind+1:].replace(’.npy’, ”) // replaced .npy
extracted id for explore sample 3

ids-[] FOR files in train path: //Pseudocode can’t handle this


ids.append(files[files.rindex(’\ \ ’)+1:].replace(’.npy’,”))
df- pd.DataFrame(”id”:ids,”path”:train path)
df- pd.merge(df, train label dataset, on=’id’)

CQT transform- CQT1992v2(sr=2048, fmin=20, fmax=500, hop length=64, verbose=False)

12
PROCEDURE preprocess function cqt(path):
OUTPUTS
signal- np.load(path.numpy())
FOR i 0 TO signal.shape[0]
signal[i] /= np.max(signal[i])
NEXT signal- np.hstack(signal)
signal- torch.from numpy(signal).float()
image- transform(signal)
image- np.array(image)
image- np.transpose(image,(1,2,0))
output tf.convert to tensor(image)
END FUNCTION

INPUT input shape-(56,193,1)

FUNCTION preprocess function parse tf(path, y=None):


OUTPUTS // [x]- tf.py function(func=preprocess function cqt, inp=[path], Tout=[tf.float32])
ENDFUNCTION
INPUT x- tf.ensure shape(x,input shape)
IF y is None
THEN
OUTPUT x
ELSE
OUTPUT x,y
ENDIF

FUNCTION get npy filepath(id , is train=True):


OUTPUTS path-”
IF is train

13
THEN
OUTPUT f’C:/sampled1/train/id [0]/id [1]/id [2]/id .npy’
ELSE
OUTPUT f’C:/sampled1/test1/id [0]/id [1]/id [2]/id .npy’
ENDIF
ENDFUNCTION

train dataset- tf.data.Dataset.from tensor slices((x train.apply(get npy filepath).values,


y train))
// shuffle the dataset
train dataset- train dataset.shuffle(len(x train))
train dataset- train dataset.map(preprocess function parse tf,
num parallel calls=tf.data.AUTOTUNE)
train dataset- train dataset.batch(batch size)
train dataset- train dataset.prefetch(tf.data.AUTOTUNE)

valid dataset- tf.data.Dataset.from tensor slices((x valid.apply(


get npy filepath).values, y valid))
valid dataset- valid dataset.map(preprocess function parse tf,
num parallel calls=tf.data.AUTOTUNE)
valid dataset- valid dataset.batch(batch size)
valid dataset- valid dataset.prefetch(tf.data.AUTOTUNE)

// Instantiate the Sequential model


model cnn- Sequential(name=’CNN model’)

INPUT //AddthefirstConvoluted2Dlayerw/input shapeMaxPooling2Dlayerfollowedbythat


model cnn.add(Conv2D(filters=16, kernel size=3, INPUT input shape- input shape,
activation=’relu’, name=’Conv 01’)),
model cnn.add(MaxPooling2D(pool size=2, name=’Pool 01’))

14
// Second pair of Conv1D and MaxPooling1D layers
model cnn.add(Conv2D(filters=32, kernel size=3, INPUT input shape- input shape,
activation=’relu’, name=’Conv 02’)),
model cnn.add(MaxPooling2D(pool size=2, name=’Pool 02’))

// Third pair of Conv1D and MaxPooling1D layers


model cnn.add(Conv2D(filters=64, kernel size=3, INPUT input shape- input shape,
activation=’relu’, name=’Conv 03’)),
model cnn.add(MaxPooling2D(pool size=2, name=’Pool 03’))

model cnn.add(Conv2D(filters=128, kernel size=3, INPUT input shape- input shape,


activation=’relu’, name=’Conv 04’))
model cnn.add(MaxPooling2D(pool size=2, name=’Pool 04’))

// Add the Flatten layer


model cnn.add(Flatten(name=’Flatten’))

// Add the Dense layers


model cnn.add(Dense(units=512, activation=’relu’, name=’Dense 01’)),
model cnn.add(Dense(units=64, activation=’relu’, name=’Dense 02’))

// Add the final Output layer


model cnn.add(Dense(1, activation=’sigmoid’, name=’Output’))
model cnn.compile(optimizer=Adam(learning rate=0.0001), loss=’binary crossentropy’,
metrics=[[AUC(), ’accuracy’]]) //Possible array.

// Fit the data


history cnn- model cnn.fit(x=train dataset, epochs=6, validation data- valid dataset,
batch size- batch size, verbose=1)

15
root dir-”C:/sampled1/”
train labels- pd.read csv(root dir + ”train/img labels.csv”)
new labels- train labels[-35010:]
x test- new labels
y test- new labels[’target’]

test dataset- tf.data.Dataset.from tensor slices((x test[’id’].apply(get npy filepath,


is train=False).values,y test))
test dataset- test dataset.map(preprocess function parse tf,
num parallel calls=tf.data.AUTOTUNE)
test dataset- test dataset.batch(batch size)
test dataset- test dataset.prefetch(tf.data.AUTOTUNE)

model cnn.compile(optimizer=Adam(learning rate=0.0001), loss=’binary crossentropy’,


metrics=[[AUC(), ’accuracy’]])
history cnn - model cnn.fit(x=train dataset, epochs=6, validation data=valid dataset,
batch size=batch size, verbose=1)
prediction - full cnn model.evaluate(test dataset)

16
Chapter 6

IMPLEMENTATION and RESULTS

This app can be used on PCs.However, the user must install python and the required
libraries for this system. We mainly focus on detecting whether the gravitational wave is
present or not. Initially when data is given preprocessing is the basic step.
As our model is based on the CNN algorithm and because of the huge dataset, it took
much time to run the model successfully. Optimization and Hyperparameter tuning plays
import role to improve the model’s efficiency

6.1 Explanation of Key functions


6.1.1 Preprocess
After the collection of the dataset, we preprocess the data. In the preprocessing phase,
we mainly perform the CQT transformation. This step is crucial because it increases model
efficiency.

6.1.2 Train
Training includes an appropriate train-test split of data and training the model. The training
phase is essential and repetitive when we perform hyper parameter tuning.

6.1.3 Test
After model training, we test the model to evaluate its performance. Based on the model
performance, we iterate our process till we get the expected result.

6.1.4 Evaluate
We evaluate the model with accuracy metrics. For this kind of classification problem, we
use a confusion matrix, precision, and recall.

6.1.5 Deploy
After the expected result, we will deploy the model based on our convenience. This system
has been deployed using the Python GUI library Tkinter.

17
6.2 Method of Implementation
6.2.1 Input
We are provided with a training and test set of time series data containing simulated gravita-
tional wave measurements from a network of 3 gravitational wave interferometers.

• LIGO Hanford
• LIGO Livingston
• Virgo

Each time series contains either detector noise or detector noise and a simulated attraction
The task is to identify when a signal is present in the data (target = 1).
Each.npy data file contains three-time series, one for each detector, lasting two seconds and
sampled at 2,048 Hz.
And we have a total of 5,60,000 files, each with a dimension of 3 x 4096, resulting in a massive
time series.

6.2.2 Output Screens

Fig. 6.1 Input Screen

18
Fig. 6.2 Output Screen

6.2.3 Result Analysis


The below picture represents model accuracy

Fig. 6.3 Accuracy

The below picture represents confusion matrix of the model.

19
Fig. 6.4 Confusion matrix

The below picture represents precision-recall curve of the model.

Fig. 6.5 Precision Recall curve

20
Chapter 7

TESTING and VALIDATION

7.1 Design of Test Cases and Scenarios


Usually, when we acquire a dataset after we perform data prepossessing we perform a train-
test split. Based on the type of problem we perform either 70-30% or 80-20% split. There are
also custom splits performed. We have a dataset of 12 GB which is split into 80-20%. The
dataset is in the form of .npy files. Each file name consists of unique ids whose target value
is mentioned in img labels.csv. When the model is tested in with test data the accuracy was
around 83%.

7.1.1 Confusion matrix


The confusion matrix is a matrix that is used to evaluate the classification models’ performance
for a given set of test data. Only if the true values for test data are known it can be determined.
The matrix itself is simple to comprehend, but the associated terminologies might be confus-
ing. It’s also known as an error matrix since it displays the flaws in the model’s performance
as a matrix. The following are some of the characteristics of the Confusion matrix:
The matrix for two prediction classes of classifiers is a 2*2 table, for three classes, a 3*3
table, and so on.
Predicted values and actual values, as well as the total number of forecasts, are separated
into two dimensions in the matrix.
True Negative: The model predicted No, and the real or actual value likewise predicted No.
True Positive: The model correctly predicted yes, and the actual value matched.
False Negative: The model predicted no, but the value was actually It’s also known as a Type-
II mistake.
False Positive: The model predicted Yes, but the value was really No. A Type-I mistake is
another name for it.

21
Classification Accuracy: classification One of the most essential elements in determining
the accuracy of classification problems is accuracy. It specifies how often the model correctly
predicts the outcome. The ratio of the number of right predictions produced by the classifier
to the total number of predictions made by the classifiers can be determined.

Precision: It can be defined as the number of correct outputs supplied by the model or
the percentage of all positive classifications that the model correctly predicted being true. The
following formula can be used to compute it.

Recall: It is defined as the percentage of positive classes that our model accurately pre-
dicted out of a total of positive classes. It is critical that the recall rate be as high as feasible.

7.2 Validation
After model evaluation, the next step is to deploy the model and test it on external data. We
deployed our model using the Tkinter library which is used for GUI applications. We have
successfully deployed and validated other data.

22
Fig. 7.1 GUI Input Screen

In the below figure probability of presence of gravitational wave is 0.19 i.e, 0.5. So we
conclude it’s not gravitational wave.

Fig. 7.2 GUI Output Screen

In the below figure probability of presence of gravitational wave is 0.98 i.e, 0.5. So we
conclude it’s a gravitational wave.

23
Fig. 7.3 GUI Output Screen

7.3 Conclusion
The idea is to use CNN to perform the classification of a gravitational wave. The next step
involves the collection of data and preprocessing. We have split our dataset in 80-20%. We
have developed a deep learning model using the CNN algorithm. It is trained with a gravita-
tional wave dataset. This model has been successfully trained evaluated and deployed. The
performance of the model is up to the mark compared to existing systems.

24
Chapter 8

CONCLUSION

In this paper, we’ve seen the importance of gravitational waves. Applications of gravita-
tional waves will have a phenomenal impact on astronomy. Traditional methods will require
the use of a detector to detect gravitational waves, and gravitational wave search methods
will require manual intervention. Working in this manner is laborious and time-consuming.
Data-related challenges are becoming easier to tackle in an era of rising computer capacity.
CNN has a demonstrated track record with large data. We used CNN to classify input data to
detect the presence of waves. It is more cost-effective compared to traditional methods. Also
proposed model is efficient compared to the existing model with .75 accuracy.
The existing model is not trained with the appropriate and adequate amount of data which
is a major drawback. The proposed system has been trained with a huge and appropriate
dataset which makes the system more reliable. There is no proper sampling of data in real-
time. If the data is captured in a universal way it will be helpful for practitioners to focus on
model improvement. We can also improve model efficiency with more preprocessing trans-
formation and using the latest invitations in Deep learning.

25
REFERENCES

[1] Benjamin P Abbott, Richard Abbott, TD Abbott, MR Abernathy, Fausto Acernese,


Kendall Ackley, Carl Adams, Thomas Adams, Paolo Addesso, RX Adhikari, et al. Ob-
servation of gravitational waves from a binary black hole merger. Physical review letters,
116(6):061102, 2016.

[2] Fet al Acernese, M Agathos, K Agatsuma, D Aisa, N Allemandou, A Allocca, J Amarni,


P Astone, G Balestri, G Ballardin, et al. Advanced virgo: a second-generation interfero-
metric gravitational wave detector. Classical and Quantum Gravity, 32(2):024001, 2014.

[3] Elena Cuoco, Jade Powell, Marco Cavaglià, Kendall Ackley, Michał Bejger, Chayan Chat-
terjee, Michael Coughlin, Scott Coughlin, Paul Easter, Reed Essick, et al. Enhancing
gravitational-wave science with machine learning. Machine Learning: Science and Tech-
nology, 2(1):011002, 2020.

[4] Albert Einstein. Approximative integration of the field equations of gravitation. Sitzungs-
ber. Preuss. Akad. Wiss. Berlin (Math. Phys.), 1916(688-696):1, 1916.

[5] Manuel D Morales, Javier M Antelis, Claudia Moreno, and Alexander I Nesterov. Deep
learning for gravitational-wave data analysis: A resampling white-box approach. Sensors,
21(9):3174, 2021.

[6] Massimiliano Razzano and Elena Cuoco. Image-based deep learning for classification
of noise transients in gravitational wave detectors. Classical and Quantum Gravity,
35(9):095016, 2018.

[7] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhi-
heng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large
scale visual recognition challenge. International journal of computer vision, 115(3):211–
252, 2015.

26
[8] Peter R Saulson. Fundamentals of interferometric gravitational wave detectors. World
Scientific, 1994.

[9] Rikiya Yamashita, Mizuho Nishio, Richard Kinh Gian Do, and Kaori Togashi. Convolu-
tional neural networks: an overview and application in radiology. Insights into imaging,
9(4):611–629, 2018.

27

You might also like