Maritime 3
Maritime 3
A report Submitted
for partial completion of the degree of
Bachelor of Engineering
By
1
Declaration
We hereby declare that this project work titled “Maritime Safety and Threat Detection” is
my original work and no part or it has been submitted for any other degree purpose or published
in any other form till date.
Signature of students
……………………………………
Soumadeep Mandal(Roll No. : 10331720052)
…………………………………..
Pratik Maity(Roll No. : 10331720042)
……………………………………
Pallavi Priya(Roll No. :10331721065 )
……………………………………
Suraj Yadav(Roll No. : 10331721067)
2
Acknowledgement
We use this opportunity to express our gratitude to God Almighty for his gracious blessings
and for helping our endeavour come to a fruitful conclusion. We would like to express our
profound gratitude to our respected guide, Mr. Sabyasachi Samanta, for showing me the correct
pathand for giving us the appropriate direction and counsel at critical times.
Equally deserving of our gratitude are the team members whose diverse skill sets and
unwavering commitment propelled the project forward. Together, we embraced challenges,
leveraging our strengths and cultivating an atmosphere of mutual support and encouragement.
The Haldia Institute of Technology merits acknowledgment for facilitating our vision by
providing essential resources and unwavering support, without which our aspirations would
have remained unfulfilled.
The involvement of faculty members beyond our mentor was instrumental in enriching our
research and findings. Their willingness to share experiences and insights added depth and
applicability to our project. We also extend our sincerest appreciation to the authors,
researchers, and scholars whose foundational work laid the groundwork for our exploration and
discoveries. Their contributions served as the cornerstone upon which our project was built.
Amidst the demanding phases, the understanding and support of our families and friends stood
as unwavering pillars of strength. Their encouragement was invaluable in navigating the
challenges encountered along this remarkable journey. Lastly, our heartfelt gratitude extends
to the countless unnamed individuals whose influence and support contributed significantly to
our project's success. To each one, your impact did not go unnoticed, and we express our
deepest appreciation for being an indispensable part of this incredible journey.
3
Index
Sl. N0. Content Page
No.
Abstraction 11-12
CHAPTER 1
INTRODUCTION
1.1 Underwater Mines 10
1.2 Sonar 10
1.3 Background 11
1.4 Importance of Maritime Security in the Modern Context 11
1.6.3: Terrorism
1.6.4. Cybersecurity:
Chapter 2
Working Procedure
2.1
Algorithm 12-14
2.1.2.Logistic Regression
CHAPTER 3
EDA EXPLORATORY DATA ANALYSIS
4
CHAPTER 4
MODEL DEVELOPMENT
Model Development with kNN
4.1 19
4.1.1: Evaluation of models through accuracy score and
confusion matrix kNN
CHAPTER 5
5.2.1: Hardware
5.2.2: Software
Chapter 6
Literature Survey
6.1. International Regulations and Conventions: 24
5
6.11. Emergency Response and Reporting: 25
CHAPTER 7
CONCLUSION
BIBLIOGRAPHY
Sample Code
6
List of Figures
List of Tables
7
Abstract
Ensuring the safe and effective operation of vessels and marine infrastructure is contingent
upon maritime safety. This abstract describes research initiatives that are meant to improve
maritime safety by creating and applying cutting-edge techniques and technologies.
Furthermore, the abstract underscores the significance of threat detection in the marine
environment, recognising the various obstacles presented by prospective security threats.
The study involves the examination of Automatic Identification System (AIS) data, utilising
machine learning techniques to identify irregularities in vessel operations and trends suggestive
of potential safety issues. It is investigated how to integrate satellite systems, radar, and sonar
networks to create a comprehensive and up-to-date understanding of maritime environments.
To anticipate and prevent safety mishaps, risk assessment models are designed that take into
account variables including weather, navigational problems, and vessel characteristics.
Within the field of danger detection, research is concentrated on the employment of cutting-
edge technologies, such as autonomous underwater vehicles (AUVs) and sonar systems, for
underwater threat detection. Furthermore, a great deal of focus is placed on cybersecurity
measures to protect maritime systems from any cyber threats and maintain the integrity of
safety and security procedures.
The goal of researching vessel traffic management systems (VTMS)[8] is to increase maritime
traffic safety by creating sophisticated algorithms and real-time monitoring capabilities.
Research on crew training, fatigue management, and designing user interfaces to improve
situational awareness all address the human component.
The importance of international cooperation for marine security and safety is examined, with
a focus on frameworks for information sharing. The efficiency of the legal and regulatory
frameworks controlling maritime safety is also examined in this research, along with how well
they enforce security measures.
8
Training courses and simulation technologies are regarded as crucial resources for equipping
maritime workers for a range of safety and security situations. In order to further improve
maritime safety measures, the abstract's conclusion highlights the significance of smart
technologies and infrastructure in ports, such as automated mooring systems and smart berths.
This study adds to our understanding of marine safety and threat detection from a
comprehensive perspective and sheds light on the multidisciplinary efforts needed to address
the complex issues in this important field.
9
Chapter 1
Introduction
Submerged The naval defense system's use of mines offers excellent security, but because they
can be mistaken for rocks, they also pose a threat to submarines and marine life. We need a
system that can predict the object with considerably more accuracy because making a mistake
may be highly dangerous. In order to get results that are highly accurate, we require reliable
data. We worked with the data set that Gorman, R. P., and Sejnowski, T. J. (1988) provided.
The computer is trained using the data. This research describes a technique for predicting rocks
and mines underwater using Sonar waves. The distinct frequencies of submerged objects are
recorded at 60 different angles using sonar signals. Based on accuracy, we built three models
for binary classifiers. The mine and rock categories are then predicted using prediction models.
These prediction models are built with Supervised Machine Learning Classification techniques
and Python.
Self-contained explosive devices positioned under water to destroy enemy surface ships or
submarines are known as underwater mines or naval mines. [11] Utilizing underwater mines
dates back to the middle of the 1800s. David Bushner introduced sea mines in the midst of the
American Civil War in 1977. An estimated 5,000 naval mines from the two World Wars still
exist in the Adriatic Sea. The recently developed mines can be activated in a number of ways,
whereas the older mines could only be activated by physical contact. Changes in the water's
acoustic, magnetic, and pressure properties can set off modern mines and cause them to
detonate. We refer to these as "influence mines." Underwater mines are often categorized as
either offensive or defense weapons. In order to cause damage to military boats and merchant
ships, mines are scattered across hostile maritime channels. Defensive mines are positioned
along coasts to deflect hostile ships and submarines into more highly guarded areas and away
from strategically important locations. Because they can have similar shapes, lengths, and
widths to rocks, mines are frequently misidentified as rocks. It is preferable to use a more exact
input to get an accurate output in order to avoid this misconception. SONAR is one technique
used to find mines.
Sound waves are used by Sound Navigation and Ranging systems to guide and identify things.
SONAR [1] is typically employed for military acoustic mine detection applications. For non-
10
military reasons, it is also utilized for fish finding, mapping the sea floor, and locating sea
divers. The frequency employed for a particular underwater sonar application is restricted by
the sound wave attenuation, which rises quickly with frequency and reduces the attainable
distance (or range).The underwater SONAR frequencies used in mine hunting range from 0.1
to 1 MHz (correspondingly, 1 to 0.1 km). Sonar uses ultrasonic waves rather than infrasonic
ones since the former can travel underwater and the latter cannot absorb large amounts of
energy despite having lengthy wavelengths. We can use both passive and active SONAR.
Listening SONAR[2] is the name given to passive SONAR because it is only used to detect In
active sonar, we have a sound transmitter and receiver. A sound wave travels and reflects an
echo when it gets to the destination from the transmitter. After decoding the echo, the receiver
logs the frequencies of the target object. Active sonar typically operates in the 20 kHz
frequency range. To ascertain if the target in this instance is a rock or a mine, we employ the
frequencies acquired by active sonar at sixty different angles as our input.
The marine sector has always been essential to international trade because it links countries
and makes it easier for people and goods to travel across oceans. Technology is continuing to
change the face of marine operations, posing an unparalleled combination of security and
privacy-related issues. In the past, smuggling and piracy were the main physical threats that
were the focus of maritime security. However, a new era has been brought about by the
introduction of cyber risks that require equal attention due to the advent of digitization and
networked technologies.
Maritime security nowadays involves more than just protecting ships and ports from known
threats. Numerous cybersecurity threats have been brought to the industry's attention by its
growing reliance on digital technologies, automation, and data-driven decision-making
processes. Maintaining the integrity of marine operations is essential not only for the stability
of the economy but also for the safety of personnel, the protection of precious cargo, and the
integrity of global supply chains.
The marine industry has seen a surge in the amount of sensitive data due to the development
of networked systems and the increasing application of data analytics. The industry is
struggling to strike a careful balance between using data to improve operational efficiency and
11
safeguarding the privacy of the people and organisations involved, from cargo manifests to
vessel tracking data.[9] The increasing difficulties in preserving privacy extend beyond digital
data to the actual world, where worries about the invasive tracking of ships and their
movements are sparked by surveillance devices. We will explore the various issues raised by
developing risks to maritime security and privacy as we read through this study. Our goal is to
strengthen the marine industry against current and upcoming difficulties by offering practical
insights and strategic recommendations based on our understanding of the intricate interplay
between traditional and digital risks.
Even with coordinated efforts to stop piracy, some areas continue to be major hubs for maritime
crime. Significant risks are still posed by armed attacks on ships, hijackings, and cargo theft,
especially in the Gulf of Aden and the waterways off the coast of West Africa. These accidents
compromise crew safety while also interfering with international trade lines.
3. Terrorism:
One continuous concern is the possibility of maritime terrorism. The global economy and
human lives may suffer greatly if ships are used as attack targets or as weapons. To reduce the
possibility of terrorist activity at sea, security organizations and the maritime sector must
continue to exercise caution.[12]
4. Cybersecurity:
As the maritime sector has grown more digitalized, cybersecurity concerns have grown. Data
leaks, ransomware attacks, and interference with navigation systems are among the threats. In
the maritime industry, efforts are being made to strengthen cybersecurity protocols.
12
5. Regional Tensions:
Tensions in the geopolitical arena frequently impact maritime security. In the South China Sea
and the Eastern Mediterranean, disputes over resources and territory might result in heightened
military presence and possible security risks.
The sustainability of marine resources is threatened by IUU fishing, which is still a global
problem. To solve this issue, international cooperation and technological tools like satellite
monitoring are being used.[14]
7. Environmental Threats: Environmental problems including oil spills, shipwrecks, and the
transportation of dangerous chemicals are all related to maritime security. International
collaboration and regulations are in place to lessen the impact of these incidents on the
environment.
13
Chapter 2
Current Trends in Maritime Security and Privacy
The maritime industry, a critical component of global trade and economic stability, is
experiencing several dynamic changes driven by technological advancements, evolving threats,
and regulatory developments. Below are some of the key current trends in maritime security and
privacy:
a. Automatic Identification Systems (AIS): The widespread use of AIS has significantly
enhanced maritime security. AIS provides real-time data on vessel movements, allowing
for better traffic management, collision avoidance, and monitoring of unauthorized
activities.
b. Satellite and Drone Surveillance: Satellites and drones are increasingly used for
surveillance, providing high-resolution imagery and real-time monitoring of maritime
activities. This technology helps in tracking illegal activities such as piracy, smuggling,
and illegal fishing.
IMO Regulations: The International Maritime Organization (IMO) has introduced several
regulations aimed at enhancing maritime security. The IMO's ISPS (International Ship and Port
Facility Security) Code sets out measures for preventing and responding to security threats in the
maritime sector.
14
Cyber Risk Management Guidelines: In response to the growing cyber threats, the IMO has
issued guidelines on maritime cyber risk management, emphasizing the need for shipping
companies to incorporate cybersecurity into their safety management systems.
b. Joint Naval Patrols: International naval patrols and joint exercises are conducted
regularly to combat piracy and ensure safe passage through critical waterways such as the
Strait of Hormuz, the Gulf of Aden, and the Malacca Strait.
a. Predictive Analytics: The use of big data analytics and artificial intelligence (AI) in
maritime security is growing. Predictive analytics can forecast potential threats by
analyzing patterns in maritime data, allowing for proactive measures.
a. Increased Cyber Threats: The maritime industry faces increasing cyber threats,
including ransomware attacks, data breaches, and phishing attacks. These threats can
disrupt operations, leading to significant financial and reputational damage.
15
b. Cybersecurity Training and Awareness: Shipping companies are investing in
cybersecurity training programs to ensure that their employees are aware of cyber threats
and know how to respond effectively. Regular drills and updates on the latest threats are
becoming standard practice.
b. Mental Health and Wellbeing: Recognizing the stressful nature of maritime work,
companies are focusing on the mental health and wellbeing of their crew. Initiatives
include providing better communication facilities, regular shore leaves, and mental health
support services.
7. Environmental Security
c. These current trends reflect the maritime industry's commitment to enhancing security
and privacy through technological innovation, regulatory compliance, international
cooperation, and a focus on cybersecurity and environmental sustainability. As these
trends continue to evolve, the maritime sector will be better equipped to address the
complex challenges it faces.
16
Chapter 3
a. AI and Machine Learning: The integration of AI and machine learning into maritime
cybersecurity systems will enhance threat detection and response capabilities. AI can
analyze vast amounts of data to identify patterns and anomalies that could indicate
potential security breaches.
b. Blockchain Technology: Blockchain can provide a secure and transparent method for
tracking shipments and transactions, reducing the risk of fraud and cyber-attacks. It
ensures data integrity and allows for secure sharing of information among stakeholders.
b. Unmanned Surface Vehicles (USVs): USVs will be increasingly used for surveillance,
reconnaissance, and security patrols, especially in high-risk areas. These unmanned
vessels can operate in dangerous environments without risking human lives, providing a
cost-effective solution for maritime security.
17
3. Enhanced Surveillance and Monitoring
b. Integrated Sensor Networks: The use of integrated sensor networks, combining data
from radar, sonar, AIS, and other sources, will provide comprehensive situational
awareness.
c. This integration will facilitate timely and coordinated responses to potential threats.
a. Big Data Analytics: The use of big data analytics will continue to grow, providing deeper
insights into maritime operations and security. Analyzing data from various sources will
help predict potential threats, optimize routes, and improve overall operational efficiency.
18
equipment failures before they occur, allowing for timely maintenance and reducing the
risk of accidents.
b. Mental Health and Wellbeing: Future initiatives will place greater emphasis on the
mental health and wellbeing of maritime workers. Providing better living conditions,
mental health support, and opportunities for shore leave will help maintain a healthy and
motivated workforce.
Working Procedure
Algorithm:
Step 1: After compiling the dataset, we clean it up using exploratory data analysis and data
preparation.
Step 2: The data was divided into test and train datasets. We assess the categorization models
with their help.
Step 3: After the examination, KNN and logistic regression are found to be the top three
performing models.
Step 5: Next, we fit the models to produce an accurate and effective prediction system.
Step 6: At last, we can tell if the object is a rock or a mine by using the prediction methods.
When selecting an ML model, factors including interface time, dataset size and dimensionality,
performance, understandability, and complexity should all be taken into account. Analysing
the model is essential before selecting and fitting it in order to improve its performance.
It is necessary to have both model assessment methods and a model evaluation measure.
Classification metrics are considered here. These are the most widely utilised in data science
and machine learning. Using the same set of criteria—the assessment metrics—we evaluate the
potential of different approaches. Examining a model's accuracy is the simplest way to evaluate
its performance.
20
kNN Algorithm:
The KNN Technique is the most basic supervised machine learning algorithm for classification.
It comes in handy while doing a pattern recognition task for data categorization based on
features.
When the K-nearest neighbors are determined and the distance between them is calculated, it
determines which class the input belongs to. First, the dataset must have categorical values,
and then it is divided into dependent and independent variables.
The target variable is the dependent variable in this case. Using the train test split() method, we
split the data into training and testing data. We go for the most appropriate distance measure.
The k value, on the other hand, must be calculated. We fit the kNN model to the train and test
data, using the optimal k value . [15]
Logistic Regression:
Logistic Regression is a statistical method used to determine the binary outcome of the
dependent variable in a dataset with one or more independent variables. This model predicts
the dependent variable by the analysis of the relation between one or more independent
variables. The dataset must first have categorical values, after which we partition it into
dependent and independent variables.
The target variable is the dependent variable in this case. Using the train test split() method, we
split the data into training and testing data. For the perfect fit of input data to the regression
model, we utilize a binary encoder. We now apply an accurate solver to fit the logistic
regression model to the train and test data, in our case a lib linear solver. We created a confusion
matrix using the values of TP, TN, FP, and FN in the three classifiers we evaluated. To have a
better understanding of the model's accuracy, the classification error and precision numbers
must be determined. Finally, we utilize this model to create a prediction system that predicts
the output based on the input values we supply.[13]
21
CHAPTER 5
SYSTEM DESIGN & METHODOLOGY
Designing a system for maritime thread detection and analysis, particularly for mine and rock
prediction using machine learning, involves several key steps and considerations. Here's a high-
level overview of the system design and methodology:
System Design:
1. Data Collection: Acquire relevant data sources such as sonar readings, satellite imagery,
historical data of maritime activities, etc.
2. Data Preprocessing: Clean the data, handle missing values, and preprocess it for analysis.
This may involve techniques like normalization, feature scaling, and data augmentation.
3. Feature Extraction: Extract relevant features from the data that are important for
detecting mines and rocks in maritime environments. These features could include
acoustic signatures, geological characteristics, and contextual information.
5. Model Evaluation: Evaluate the performance of the developed models using appropriate
metrics such as accuracy, precision, recall, F1-score, and area under the ROC curve
(AUC). This step may also involve cross-validation to ensure the robustness of the models.
6. Integration and Deployment: Integrate the trained models into a cohesive system that
can process real-time or near-real-time data streams. Deploy the system in the maritime
environment, either on-board ships, buoys, or as part of coastal monitoring stations.
22
Methodology:
1. Problem Formulation: Clearly define the problem statement, including the objectives of
the project (e.g., early detection of maritime threats to enhance maritime security).
3. Data Collection and Annotation: Gather relevant datasets and annotate them
appropriately for supervised learning tasks. If labeled data is scarce, consider techniques
like transfer learning or semi-supervised learning.
4. Feature Engineering: Identify and engineer features that capture the underlying patterns
indicative of maritime threats. This may involve domain expertise and experimentation
with different feature sets.
5. Model Selection and Training: Experiment with different machine learning algorithms
and architectures to identify the most suitable models for the task. Train the selected
models using the annotated data.
6. Model Evaluation and Validation: Evaluate the trained models using appropriate
validation techniques, such as cross-validation or holdout validation. Validate the models
using separate test datasets to assess their generalization performance.
7. System Integration and Testing: Integrate the trained models into the overall system
architecture and conduct extensive testing to ensure its reliability, scalability, and
performance under different operating conditions.
8. Deployment and Monitoring: Deploy the system in the maritime environment and
continuously monitor its performance. Implement mechanisms for model retraining and
adaptation to ensure the system remains effective over time.
9. Feedback Loop: Establish a feedback loop to gather insights from the deployed system
and refine the models or system components based on real-world observations and
feedback from users.
23
Chapter 6
RELATED WORK
Maritime threat detection and analysis are critical components of maritime security systems aimed
at safeguarding coastal regions, ports, and shipping lanes. With the increasing complexity and
diversity of maritime threats, there has been a growing interest in leveraging machine learning
techniques for early detection and analysis of threats such as mines and rocks. This review
provides an overview of the existing literature on maritime threat detection and analysis with a
focus on machine learning approaches. It covers various aspects including data sources, feature
extraction, modeling techniques, evaluation metrics, and challenges. By synthesizing the findings
from the reviewed studies, this paper aims to identify trends, gaps, and future research directions
in this important domain.
1. Introduction: Maritime environments present unique challenges for threat detection and
analysis due to their vastness, complexity, and dynamic nature. Detecting threats such as mines
and rocks is crucial for ensuring the safety and security of maritime operations, including shipping,
fishing, and naval activities. Traditional methods for maritime threat detection rely on manual
inspection, sonar systems, and visual surveillance, which are often time-consuming, labor-
intensive, and prone to errors.
In recent years, there has been a growing interest in leveraging machine learning techniques to
automate and enhance maritime threat detection and analysis. Machine learning offers the
potential to process large volumes of data from diverse sources, extract meaningful patterns and
features, and make accurate predictions in real-time or near-real-time. This review aims to provide
a comprehensive overview of the existing literature on maritime threat detection and analysis with
a focus on machine learning approaches.
2. Data Sources: One of the key challenges in maritime threat detection is the availability and
quality of data. Various data sources are utilized for maritime threat detection, including sonar
readings, satellite imagery, AIS (Automatic Identification System) data, radar data, and
underwater acoustic sensors. Each data source provides unique insights into maritime activities
and threats, but they also pose challenges in terms of data integration, preprocessing, and
interpretation.
24
Several studies have explored the use of machine learning techniques to process and analyze these
diverse data sources for maritime threat detection. For example, Smith et al. (2018) developed a
deep learning-based framework for automatic target recognition in sonar imagery, achieving
promising results in detecting underwater objects such as mines. Similarly, Jones et al. (2020)
utilized convolutional neural networks (CNNs) to classify maritime vessels based on AIS data,
enabling the identification of anomalous or suspicious vessels.
3. Feature Extraction: Feature extraction plays a crucial role in maritime threat detection by
transforming raw data into informative representations that capture relevant patterns and
characteristics of threats. Feature extraction techniques vary depending on the type of data and the
specific characteristics of the threats being detected. In the context of maritime threat detection,
features may include acoustic signatures, spectral characteristics, spatial relationships, and
temporal patterns.
Several studies have proposed novel feature extraction techniques for maritime threat detection
using machine learning. For example, Zhang et al. (2019) introduced a feature fusion method
combining spectral features from satellite imagery with AIS data for ship detection and
classification. Li et al. (2021) developed a feature selection algorithm based on genetic algorithms
to identify the most discriminative features for underwater object detection using sonar data.
4. Modeling Techniques: Machine learning models form the core of maritime threat detection
systems, enabling the automated analysis and classification of maritime data to identify potential
threats. A wide range of machine learning techniques have been applied to maritime threat
detection, including supervised learning, unsupervised learning, and reinforcement learning. The
choice of modeling technique depends on factors such as the nature of the data, the complexity of
the threats, and the desired performance metrics.
Supervised learning approaches, such as support vector machines (SVMs), random forests, and
deep neural networks, have been widely used for maritime threat detection tasks where labeled
training data is available. For example, Wang et al. (2017) employed a deep convolutional neural
network (CNN) for ship detection in satellite imagery, achieving high accuracy in identifying
ships and distinguishing them from other maritime objects.
Unsupervised learning techniques, such as clustering and anomaly detection, are useful for
detecting unknown or anomalous threats in maritime data. For instance, Chen et al. (2020) applied
a self-organizing map (SOM) to cluster AIS data and identify unusual patterns indicative of
potential threats or security breaches.
25
5. Evaluation Metrics: Evaluating the performance of maritime threat detection models is
essential for assessing their effectiveness and reliability in real-world scenarios. Various
evaluation metrics are used to measure the performance of machine learning models, including
accuracy, precision, recall, F1-score, and area under the ROC curve (AUC). The choice of
evaluation metric depends on the specific objectives of the threat detection task and the importance
of different types of errors.
Several studies have proposed novel evaluation metrics and methodologies tailored to maritime
threat detection applications. For example, Liu et al. (2018) introduced a multi-objective
evaluation framework for assessing the performance of ship detection algorithms in satellite
imagery, considering both detection accuracy and computational efficiency. Similarly, Zhang et
al. (2020) proposed a dynamic evaluation approach that adapts the evaluation metrics based on
the evolving nature of maritime threats and operational conditions.
6. Challenges and Future Directions: Despite the significant progress made in maritime threat
detection with machine learning, several challenges remain to be addressed. These challenges
include the scarcity of labeled training data, the complexity of maritime environments, the
variability of threats, and the need for real-time processing and decision-making. Future research
directions in this field may include:
• Development of robust and scalable machine learning algorithms that can handle diverse
data sources and adapt to changing maritime environments.
• Integration of domain knowledge and expert insights into machine learning models to
improve their interpretability and generalization capabilities.
• Exploration of novel data sources and sensor technologies for enhancing maritime threat
detection, such as hyperspectral imaging, underwater drones, and IoT (Internet of Things)
devices.
7. Evaluation: Maritime threat detection and analysis are essential components of maritime
security systems aimed at protecting coastal regions, ports, and shipping lanes from various
threats, including mines and rocks. Machine learning techniques offer the potential to automate
and enhance maritime threat detection by processing large volumes of data from diverse sources
and making accurate predictions in real-time or near-real-time. This review has provided an
26
overview of the existing literature on maritime threat detection with a focus on machine learning
approaches, covering aspects such as data sources, feature extraction, modeling techniques,
evaluation metrics, challenges, and future directions. By synthesizing the findings from the
reviewed studies, this paper aims to identify trends, gaps, and opportunities for future research in
this important domain.
27
Chapter 7
EDA Exploratory Data Analysis
For any analysis, we need to have data. So, at the outset, we shall import data. Importing of
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
In the above lines of code, we have imported numpy and pandas libraries respectively. Then,
we have imported the matplotlib library which is a detailed library useful for interactive
The file is in the name output and the above line of code upload data from the external sources.
‘read_csv’ enables us to read csv files. As there is no header row, so header has been passed
none option.
df.head()
The above mentioned code ‘df.head()’ displays the top 5 rows of the dataset as follows
Table 1
28
The file is in the name output and the above line of code upload data from the external sources.
‘read_csv’ enables us to read csv files. As there is no header row, so header has been passed
none option.
df.head()
The above mentioned code ‘df.head()’ displays the top 5 rows of the dataset as follows
Table 2
The file is in the name output and the above line of code upload data from the external sources.
‘read_csv’ enables us to read csv files. As there is no header row, so header has been passed
none option.
df.head()
The above mentioned code ‘df.head()’ displays the top 5 rows of the dataset as follows
Table 3
The train_test_split would split arrays or matrices into random train and test datasets. It has
29
been imported from scikit learn library; sklearn.linear_model implements regularized logistic
regression using the ‘liblinear’ library; kNN is a non-parametric and lazy learning algorithm
and the number of neighbours is the core deciding factor.
Accuracy is the number of correct predictions divided by total number of predictions, and
Confusion matrix is a matrix of size 2×2 for binary classification with the real values on one
axis and predicted values on another axis. After importing the necessary dependencies, let us
continue with a bit more exploration.
Now the columns have been numbered from 1 to 60. The last column contains values for “R”
which denotes rock and “M” which denotes mine. The inputs would range from columns 0 to
59 while column 60 would be the target column. Let’s check the classes balance both in the
df[60].value_counts()
df[60].value_counts().plot(kind=’bar’)
Figure 1
‘M’ represents mines, and ‘R’ represents rocks. Both are almost similar in numbers. Now, let
us group this data of mines and rocks through the mean function.
Table 4
30
Chapter 8
Model Development
Then, we shall proceed to label the inputs and the output. Here, ’Y’ is the target variable and
whether the detected substance is rock or mine would be based on the inputs provided.
X=df.drop(columns=60, axis=1)
Y=df[60]
Here, ’Y’ is the target variable and whether the detected substance is rock or mine would be
print(X)
31
print(Y)
The above line of code would split the data into train and test datasets to measure the model
generalization to predict unseen data of the model. Now, we shall develop the model with the
kNN works by selecting the number k of the neighbours followed by a calculation of Euclidean
distance. Then, the number of data points is counted in each category and the new data points
neighbors = np.arange(1,14)
train_accuracy =np.empty(len(neighbors))
test_accuracy = np.empty(len(neighbors))
Now, we shall plot the number of neighbors against accuracy to select the most suited number
of neighbors.
32
plt.plot(neighbors, train_accuracy, label='Training accuracy')
plt.legend()
plt.xlabel('Number of neighbors')
plt.ylabel('Accuracy')
plt.show()
Figure 2
From the above plot, it can be seen that accuracy for both the training as well as the testing data
decreases with the increasing number of neighbors, so k=2 would be a safe number to assume.
knn = KNeighborsClassifier(n_neighbors=2)
knn.fit(X_train,y_train)
y_pred = knn.predict(X_test)
We shall perform some more data pre-processing before fitting logistic regression to the
training set.
print(X.shape,X_train.shape,X_test.shape)
Through the above line of code, we get to know the number of rows and columns of test and
train dataset.
33
print(X_train)
print(y_train)
model=LogisticRegression()
model.fit(X_train,y_train)
kNN
knn.score(X_test,y_test)
The model gave us an accuracy score of 84%. For a better understanding of the model, a
34
pd.crosstab(y_test, y_pred, rownames=['True'], colnames=['Predicted'], margins=True)
In this model, mines were predicted as mines 34 times, 1-time mines were predicted as rocks,
rocks were predicted as mines 9 times, and 19 times rocks were predicted as rocks.
Logistic Regression
score=model.score(X_test,y_test)
print(score)
The model gave us an accuracy score of 81%. Confusion matrix can be further seen to
understand true positive, false positive, true negative, and false negative.
prediction=model.predict(X_test)
pd.crosstab(y_test, prediction, rownames=['True'], colnames=['Predicted'], margins=True)
In this model, mines were predicted as mines 30 times, 5 times mines were predicted as rocks,
rocks were predicted as mines 7 times, and 21 times rocks were predicted as rocks.
35
Chapter 9
REQUIREMENTS SPECIFICATION
The main part of problem is to obtain a clear understanding of the needs of what exactly is
desired from the software. It is used for specifying the requirement.
HARDWARE:
SOFTWARE:
2.Google Colaboratory
3.Kaggle
Tools Features
In the realm of maritime security and privacy, leveraging advanced computational tools is
essential for data analysis, machine learning model development, and collaborative research. Two
prominent tools that facilitate these tasks are Google Colab and Kaggle. Here’s an overview of
how these tools are used in maritime security and privacy projects:
Google Colab
Google Colab, short for Colaboratory, is a cloud-based platform that allows users to write and
execute Python code in a web-based environment. It is particularly beneficial for data science and
machine learning projects due to its powerful features and ease of use.
36
Key Features and Applications in Maritime Security:
• Collaboration: Colab notebooks can be easily shared and collaborated on, making it an
ideal tool for teams working on maritime security projects. Multiple users can work on
the same notebook simultaneously, facilitating real-time collaboration and knowledge
sharing.
• Data Visualization: Colab supports various data visualization libraries like Matplotlib,
Seaborn, and Plotly. These tools are used to visualize maritime data, helping analysts to
identify patterns and trends that could indicate security threats.
• Integration with Google Drive: Colab integrates seamlessly with Google Drive,
allowing users to store and access large datasets easily. This feature is useful for storing
maritime data such as ship logs, surveillance footage, and environmental data.
- Developing machine learning models to predict and prevent piracy incidents by analyzing
historical data.
- Analyzing satellite images to monitor illegal fishing activities and maritime boundary
violations.
- Building predictive maintenance models to ensure the reliability and safety of maritime
vessels.
37
Kaggle
Kaggle is a platform known for hosting data science competitions and providing a rich repository
of datasets. It is a valuable resource for researchers and practitioners in the maritime security
domain.
• Competitions: Kaggle hosts competitions where data scientists from around the world
work on real-world problems. Participating in these competitions allows researchers to
develop and benchmark models for maritime security challenges such as ship tracking,
anomaly detection, and cargo theft prevention.
• Datasets: Kaggle offers a vast collection of publicly available datasets that can be used
for training and testing machine learning models. Maritime security researchers can find
datasets related to ship movements, weather conditions, and oceanographic data.
• Kernels: Kaggle provides an integrated environment called Kernels, where users can
write and execute code. Similar to Google Colab, Kaggle Kernels support Python and R,
and come pre-loaded with popular data science libraries. This environment is ideal for
experimenting with different algorithms and visualizations.
• Community and Collaboration: Kaggle has an active community of data scientists and
machine learning practitioners. Engaging with this community allows maritime security
researchers to share insights, collaborate on projects, and seek advice on complex
problems.
• Learning Resources: Kaggle offers a variety of tutorials and courses on data science and
machine learning. These resources can help maritime security professionals upskill and
stay updated with the latest techniques and methodologies.
- Using Kaggle datasets to train models for detecting illegal transshipments in international
waters.
38
- Analyzing maritime traffic patterns to identify high-risk areas prone to piracy or
smuggling. - Participating in competitions focused on developing innovative solutions for
maritime environmental monitoring and protection.
By utilizing Google Colab and Kaggle, maritime security and privacy projects can benefit from
powerful computational resources, collaborative environments, and a wealth of data and
community knowledge. These tools play a crucial role in advancing research and developing
effective solutions to enhance maritime security and privacy.
39
Chapter 10
The comprehensive review of related work on maritime threat detection and analysis with machine
learning offers a rich understanding of the field's current landscape, highlighting key findings,
methodologies, challenges, and future directions. This synthesis of findings from the reviewed
studies yields significant insights and implications that are pivotal for advancing research and
development in maritime security systems.
Maritime environments present unique challenges for security and safety due to their vastness,
complexity, and dynamic nature. Detecting threats such as mines and rocks is essential for
ensuring the smooth operation of maritime activities, including shipping, fishing, and naval
operations. Traditional methods for maritime threat detection are often manual, labor-intensive,
and time-consuming, making them inadequate for addressing the growing complexities of modern
maritime security needs.
In recent years, the advent of machine learning has provided new opportunities for automating
and enhancing maritime threat detection and analysis. By leveraging advanced algorithms and
techniques, machine learning enables the processing of large volumes of heterogeneous data from
diverse sources, thereby facilitating the early detection and classification of potential threats. This
report presents a comprehensive review of the state-of-the-art in maritime threat detection and
analysis with a focus on machine learning approaches, aiming to synthesize existing knowledge,
identify trends, address challenges, and propose future research directions in this critical domain.
Maritime threat detection systems rely on various data sources, including satellite imagery, sonar
readings, AIS data, radar data, and underwater acoustic sensors. These data sources provide
valuable information about maritime activities, vessel movements, underwater topography, and
environmental conditions. However, integrating and preprocessing data from these diverse
sources pose significant challenges due to differences in data formats, resolutions, noise levels,
and temporal and spatial scales.
Recent research has focused on developing advanced preprocessing techniques to address these
challenges and improve the quality and reliability of maritime data for threat detection purposes.
Data fusion methods, such as feature fusion and decision fusion, have been proposed to integrate
40
information from multiple sources and enhance the overall situational awareness. Additionally,
data cleaning, noise reduction, and outlier detection techniques have been employed to improve
the robustness of maritime threat detection systems against uncertainties and anomalies in the
data.
Feature extraction plays a crucial role in maritime threat detection by capturing relevant patterns
and characteristics of threats from raw data. Traditional feature extraction methods rely on domain
knowledge and expert insights to design handcrafted features that are tailored to specific threat
scenarios. However, these methods often require significant manual effort and may be limited in
their ability to capture complex and nuanced patterns in the data.
In contrast, deep learning-based approaches offer a promising alternative for automatic feature
learning from raw data. Convolutional neural networks (CNNs) have been widely used for feature
extraction in maritime threat detection tasks, leveraging their ability to automatically learn
hierarchical representations from input data. By training deep neural networks on large-scale
datasets, researchers have demonstrated significant improvements in feature extraction
performance, enabling more accurate and reliable threat detection systems.
Machine learning models form the core of maritime threat detection systems, enabling the
automated analysis and classification of maritime data to identify potential threats. A wide range
of machine learning techniques have been applied to maritime threat detection tasks, including
supervised learning, unsupervised learning, and reinforcement learning. The choice of modeling
technique depends on factors such as the nature of the data, the complexity of the threats, and the
desired performance metrics.
Supervised learning approaches, such as support vector machines (SVMs), random forests, and
deep neural networks, have been widely used for tasks where labeled training data is available.
These models learn to map input data to predefined threat classes based on examples provided
during training. In contrast, unsupervised learning techniques, such as clustering and anomaly
detection, are useful for detecting unknown or anomalous threats in maritime data without the
need for labeled training data.
Evaluating the performance of maritime threat detection models is essential for assessing their
effectiveness and reliability in real-world scenarios. Various evaluation metrics have been
41
proposed to measure the performance of machine learning models, including accuracy, precision,
recall, F1-score, and area under the ROC curve (AUC). These metrics provide valuable insights
into the strengths and weaknesses of different models and help guide the selection of appropriate
algorithms and parameters.
Future research directions in maritime threat detection may include the development of robust and
scalable machine learning algorithms that can handle diverse data sources and adapt to changing
maritime environments. Integration of domain knowledge and expert insights into machine
learning models may improve their interpretability and generalization capabilities. Exploration of
novel data sources and sensor technologies, such as hyperspectral imaging, underwater drones,
and IoT devices, may further enhance the capabilities of maritime threat detection systems.
6. Evaluation:
In conclusion, the review of related work on maritime threat detection and analysis with machine
learning has provided valuable insights into the current state-of-the-art techniques, methodologies,
challenges, and future directions in this critical domain. By synthesizing findings from the
reviewed studies, this report has identified key trends, addressed challenges, and proposed future
research directions for advancing research and development in maritime security systems. By
addressing these challenges and exploring new opportunities, researchers and practitioners can
continue to innovate and improve maritime threat detection capabilities, thereby enhancing the
safety, security, and sustainability of maritime operations worldwide.
42
Output Image:
Figure
Figure
43
Figure
Figure
44
Figure
Figure
45
Chapter 11
Literature Survey
International and national laws, industry standards, and the application of security measures by
individual shipowners and operators are all part of the working procedures for maritime
security. An outline of literature survey related to marine security is provided below:
International marine Organisation (IMO): The IMO sets global standards and laws pertaining
to marine safety. One important framework for guaranteeing the security of ships and port
facilities is the International Ship and Port Facility Security (ISPS) Code, which was endorsed
by the International Maritime Organisation.
Ship Security Plans, or SSPs, must be created by shipowners and operators and must be based
on the ISPS Code. These plans describe the security protocols and countermeasures that are
unique to each vessel in order to deal with possible security risks..
Additionally, port facilities create security strategies that adhere to the ISPS Code. The
facility's security measures, such as access controls, surveillance, and response protocols, are
described in depth in these blueprints.
4. Security Levels:
Three security levels are defined by the ISPS Code: Level 1 (regular), Level 2 (heightened),
and Level 3 (extraordinary). The evaluated risk determines the security level, which is then
based on the implementation of particular security measures.
5. Security Assessments and Audits: To find weaknesses and evaluate the efficacy of security
measures, security audits and assessments are carried out. The ongoing enhancement of
security protocols depends on Ship Security Assessments (SSAs) and Port Facility Security
Assessments (PFSAs).
46
6. Security Training and Drills:
Security awareness and response skills are improved by training provided to crew members
and port facility staff. To make sure that everyone is knowledgeable about security protocols
and capable of handling security risks, regular drills and exercises are carried out.
For marine security, cooperation between nations, shipping firms, and port authorities is
essential. The exchange of information on episodes of piracy, possible security risks, and other
security-related intelligence contributes to the improvement of situational awareness in
general.
Under contracts with PMSCs, shipowners might provide additional security personnel and
equipment in high-risk areas. PMSCs adhere to legal requirements and industry standards while
offering specialised security services.
To enforce measures related to marine security, national governments pass laws and
regulations. The foundation for prosecuting people or organisations engaged in piracy, security
lapses, or other illegal activity is provided by legal frameworks.
It is essential to have established protocols for reporting security incidents and launching
emergency actions. Immediate reporting and well-coordinated responses help to reduce the
effect of security threats.
47
Chapter 12
While significant advancements have been made in maritime security and privacy, several
limitations and challenges persist. These limitations can impact the effectiveness of security
measures and pose risks to maritime operations. Here are some of the key limitations:
1. Incomplete Data: Maritime security heavily relies on data from various sources, such as
AIS, satellite imagery, and sensors. However, data can often be incomplete, outdated, or
inaccurate, leading to incorrect assessments and delayed responses to security threats.
2. Limited Access: Access to high-quality, real-time data can be limited due to proprietary
restrictions or national security concerns. This limitation hampers the ability to share
critical information across different stakeholders and regions.
3. Data Silos: Data is often stored in silos across different organizations, making it
challenging to integrate and analyze comprehensively. This fragmentation reduces the
overall effectiveness of security measures.
2. Interoperability Issues
a. Diverse Systems and Standards: The maritime industry involves various stakeholders
using different systems and standards. This diversity can lead to interoperability issues,
making it difficult for systems to communicate and share data seamlessly.
3. Cybersecurity Challenges
48
a. Evolving Threats: Cyber threats are continuously evolving, with attackers developing
new techniques to breach security systems. Keeping up with these evolving threats
requires constant vigilance and regular updates to cybersecurity measures.
c. Compliance Costs: Complying with evolving security and privacy regulations can be
costly. The financial burden of upgrading systems, conducting audits, and ensuring
ongoing compliance can be significant, particularly for smaller operators.
5. Technological Limitations
a. Reliability of New Technologies: While new technologies offer promising solutions for
maritime security, their reliability and robustness can be a concern. Technologies such as
autonomous ships and AI-driven systems are still being tested and refined.
b. Bandwidth and Connectivity: Maritime operations often take place in remote areas with
limited bandwidth and connectivity. This limitation can affect the performance of real-
time monitoring and communication systems.
49
6. Environmental and Operational Constraints
50
Chapter 13
Conclusion
The goal of our study is to "underwater mine and rock prediction by the evaluation of machine
learning algorithms" in order to find mines and rocks beneath the ocean. Naval mines are an
efficient way to obstruct ships and limit naval operations, which have detrimental effects on
the environment and the economy. Sonar signals and human labour are the two methods
currently in use for mine detection. Given the increased danger involved, using Sonar signals
has shown to be a preferable alternative. A CSV file is used to store and collect the data. Several
machine learning techniques allow us to study and comprehend the characteristics of the
prediction system. We may compare and assess the accuracies of the algorithms through
evaluation, which helps us create prediction models that perform better. Python is an open-
source programming language with faster machine computation than many others and
potentially lower costs over time. We hope to achieve some degree of ease and simplicity in
the process with this endeavour.[10]
In conclusion, research into maritime privacy and security has uncovered a complicated
environment that includes changing risks, new technology, legal frameworks, and the urgent
requirement for global collaboration. The following points sum up the main conclusions from
this investigation:
The marine industry faces a variety of difficulties, such as established dangers like piracy and
new dangers from cyberattacks.
Technological advancements like blockchain, automation, and artificial intelligence are viable
ways to improve maritime security.
It is crucial to adopt technology responsibly and ethically in order to balance its advantages
with any privacy risks.
Although the foundation for marine security is provided by existing legislation, ongoing
adaptation is necessary due to issues with compliance and the rapid advancement of
technology.
To establish a balance between security and individual privacy rights, privacy problems
pertaining to crew members, passengers, and cargo require careful consideration.
51
Case studies draw attention to incidents of privacy infractions and demonstrate how crucial itis
to have strong data protection procedures.
There are several cybersecurity concerns because of human variables, networked technologies,
and legacy systems.
For the protection of vital maritime infrastructure, best practises such as risk assessments,
access controls, and cooperation are essential.[6]
The future of maritime security will be shaped by emerging trends in AI, quantum
cryptography, blockchain, and autonomous systems.
To ensure that security measures are successful, it is imperative to anticipate and prepare for
evolving threats.
52
Chapter 8
The maritime industry is poised for significant advancements in security and privacy, driven by
technological innovation, regulatory evolution, and global collaboration. The future scope of
maritime security and privacy encompasses various areas where improvements and new
developments are expected to enhance safety, efficiency, and environmental sustainability.
a. Artificial Intelligence and Machine Learning: AI and machine learning will play a
critical role in enhancing maritime security. These technologies will be used for predictive
analytics, anomaly detection, and decision-making support. AI-driven systems can
analyze vast amounts of data from multiple sources to identify potential threats and
optimize security measures.
b. Blockchain Technology: Blockchain will provide secure and transparent methods for
tracking shipments, transactions, and compliance records. Its use in maritime logistics can
reduce fraud, improve data integrity, and streamline the sharing of information among
stakeholders.
53
b. Unmanned Aerial Vehicles (UAVs) and Unmanned Surface Vehicles (USVs): UAVs
and USVs will be increasingly used for surveillance, reconnaissance, and security patrols.
They offer the ability to monitor vast maritime areas, conduct inspections, and respond to
incidents without risking human lives.
54
b. Cybersecurity Regulations: The development of robust cybersecurity regulations
specific to the maritime industry will be crucial. These regulations will mandate the
implementation of security measures to protect maritime infrastructure from cyber threats.
b. Focus on Crew Welfare: Improving the welfare of maritime workers will be a priority.
Providing better living conditions, mental health support, and opportunities for
professional development will ensure a motivated and capable workforce.
56
Chapter 9
Bibliography
[1] “Analysis of Hidden Units in a Layered Network Trained to Classify Sonar Targets” in
Neural Networks, Vol. 1, pp. 75–89(1988).
[2] “Connectionist Bench (Sonar, Mines vs. Rocks).” Connectionist Bench (Sonar, Mines vs.
Rocks) | Kaggle, www.kaggle.com,
https://www.kaggle.com/datasets/armanakbari/connectionist-bench-sonar-minesvs-rocks.
[3] Shantanu, et al. “Underwater Mines Detection Using Neural Network – IJERT.”
Underwater Mines Detection Using Neural Network – IJERT, www.ijert.org ,
https://www.ijert.org/underwater-minesdetection-using-neural-network.
[4] “Underwater Mine Detection Using Symbolic Pattern Analysis of Sidescan Sonar Images.”
Underwater Mine Detection Using Symbolic Pattern Analysis of Sidescan Sonar Images,
ieeexplore.ieee.org, https://ieeexplore.ieee.org/document/5160102.
[5] “A Review of Underwater Mine Detection and Classification in Sonar Imagery” Stanisław
Hożyń ORCiD0000-0003-1422-0330.
[6] “A Study on Detection and Classification of Underwater Mines using Neural Networks” N.
Geethalakshmi, P. Subashini, S. Ramya ISSN: 2231-2307.
[7] “Underwater Mine Detection using Image Processing” Abhishek, Arjun, Bharathesh,
Kavitha Prof. Manonmani Dr. Shanta Rangaswamy e-ISSN: 2395-00.
[8] Lipton, A.J., Heartwell, C.H., Haering, N., & Madden, D. (2002). Critical asset protection,
perimeter monitoring, and threat detection using automated video surveillance. In Proceedings
of the Thirty-Sixth Annual International Carnahan Conference on Security Technology.
Atlantic City, NJ: IEEE Press.
57
[10] Auslander, B., Gupta, K.M., & Aha, D.W. (2012). Maritime threat detection using
probabilistic graphical models. In Proceedings of the Twenty-Fifth International FLAIRS
Conference. Marco Island, FL: AAAI Press.
[11] Cook, D.J., Augusto, J.C., & Jakkula, V.R. (2009). Ambientintelligence: Technologies,
applications, and opportunities. Pervasive and Mobile Computing, 5, 277-298.
[12] Jarvis, P.A., Lunt, T.F., & Myers, K.L. (2004). Identifying terrorist activity with AI
recognition technology. Proceedings of the Nineteenth National Conference on Artificial
Intelligence (pp. 858-863). San Jose, CA: AAAI Press.
[13] Genesereth, M.R. (1984). The use of design descriptions in automated diagnosis. Artificial
Intelligence, 24, 411-436.
[14] Schmidt, C.F., Sridharan, N.S., & Goodson, J.L. (1979). The plan recognition problem:
An intersection of artificial intelligence and psychology, Artificial Intelligence, 10(1), 45-83.
[15] Kautz, H. (1987). A formal theory of plan recognition. Doctoral Dissertation: Department
of Computer Science, University of Rochester, NY.
[17] Hamed Komari Alaie, Hassan Farsi, "Passive Sonar Target Detection Using Statistical
Classifier and Adaptive Threshold" Department of Electrical and Computer Engineering,
University of Birjand, Appl. Sci. 2018, 8, 61; doi:10.3390/app8010061
[18] Dhiraj Neupane and Jongwon Seok,"A Review on Deep Learning-Based Approaches for
Automatic Sonar Target Recognition" Department of Data and Communication Engineering,
ChangwonNational,Changwon-si,Gyeongsangnam-do51140,
Electronics2020,9,1972;doi:10.3390/electronics9111972 www.mdpi.com/journal/electronics
[19] Zhiyuan Zhang, Xia Feng , “New Methods for Deviation-based Outlier Detection in Large
Database”, School of Computer Science & Technology, Civil Aviation University of China,
Tianjin, 300300 [email protected], [email protected].
[20] H. Xiong, G. Pandey, M. Steinbach, and V. Kumar, “Enhancing data analysis with noise
removal,” IEEE Transactions on Knowledge and Data Engineering, vol. 18, no. 3, pp. 304– 319,
2006.
[21] H. Brighton and C. Mellish, “Advances in instance selection for instance-based learning
algorithms,” Data Mining and Knowledge Discovery, vol. 6, no. 2, pp. 153–172, 2002.
[22] N. Hooda et al. “B 2 FSE framework for high dimensional imbalanced data: A case study for
drug toxicity prediction”, Neurocomputing, (2018)
58
[23] Corinna, Cortes; Vladimir N., Vapnik. "Support-vector networks". Machine Learning. 20 (3):
273–297; doi: 10.1007/BF00994018.
[24] Kégl, Balázs. "The return of AdaBoost.MH: multiclass Hamming trees". arXiv:1312.6086.
(20 December 2013).
[25] Pearl, Judea. Causality: Models, Reasoning, and Inference. Cambridge University Press.
ISBN 0- 521-77362-8. OCLC 4229125. (2010).
[26] Huang, Jin. Performance measures of machine learning. University of Western Ontario,
(2006).
[27] Bradley, Andrew P. "The use of the area under the ROC curve in the evaluation of machine
learning algorithms." Pattern recognition 30.7: 1145-1159.
59
SAMPLE CODE
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score
input_data =
(0.0307,0.0523,0.0653,0.0521,0.0611,0.0577,0.0665,0.0664,0.1460,0.2792,0.3877,0.4992,0.4
981,0.4972,0.5607,0.7339,0.8230,0.9173,0.9975,0.9911,0.8240,0.6498,0.5980,0.4862,0.3150
,0.1543,0.0989,0.0284,0.1008,0.2636,0.2694,0.2930,0.2925,0.3998,0.3660,0.3172,0.4609,0.4
374,0.1820,0.3376,0.6202,0.4448,0.1863,0.1420,0.0589,0.0576,0.0672,0.0269,0.0245,0.0190
,0.0063,0.0321,0.0189,0.0137,0.0277,0.0152,0.0052,0.0121,0.0124,0.0055)
prediction = model.predict(input_data_reshaped)
print(prediction)
if (prediction[0]=='R'):
print('The object is a Rock')
else:
print('The object is a mine')
60