0% found this document useful (0 votes)
13 views76 pages

Final Doc (Star Classification)

The project report details the implementation of machine learning techniques to automate star type classification using NASA data. It highlights the limitations of traditional classification methods and presents the Random Forest Classifier as an effective solution for categorizing stars into six types. The approach aims to enhance efficiency, reduce human bias, and support various astronomical studies.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views76 pages

Final Doc (Star Classification)

The project report details the implementation of machine learning techniques to automate star type classification using NASA data. It highlights the limitations of traditional classification methods and presents the Random Forest Classifier as an effective solution for categorizing stars into six types. The approach aims to enhance efficiency, reduce human bias, and support various astronomical studies.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AUTOMATED STAR TYPE CLASSIFICATION WITH

MACHINE LEARNING USING NASA DATA


A Project Report Submitted to
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, ANANTAPUR

Submitted By

[Link] [Link] [Link] [Link]


(212U1A3302) (212U1A3307) (212U1A3317) (212U1A3340)

Under the Esteemed Guidance of


Dr. K. SUNDEEP KUMAR, [Link](IT), M.E(CSE), Ph.D.(CSE)
Professor
Department of Computer Science and Engineering

Project report submitted in partial fulfillment of the

requirements for the award of the degree of

BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING(AI&ML)

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING(AI&ML)

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY


A Unit of USHODAYA EDUCATIONAL SOCIETY
Approved by AICTE, New Delhi & Permanently Affiliated to JNTUA, Anantapuramu
NAAC ‘A’ Grade Accredited Institution, An ISO 9001:2015 certified Institution
Recognized under Sec. 2(f)&12(B) of UGC Act, 1956
3rd Mile Bombay Highway, Gangavaram (V), Kovur(M), SPSR Nellore (Dt), Andhra Pradesh, India-524137

Ph. No. 08622-212769, E-Mail: geethanjali@[Link], Website: [Link]

(2021-2025)
Website : [Link] Ph : 08622-212781

Email: aimlhod@[Link] Fax: 08622-212778

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY


A Unit of USHODAYA EDUCATIONAL SOCIETY
Approved by AICTE, New Delhi & Permanently Affiliated to JNTUA, Anantapuramu

NAAC ‘A’ Grade Accredited Institution, An ISO 9001:2015 certified Institution


Recognized under Sec. 2(f) & 12(B) of UGC Act, 1956
3rd Mile, Bombay Highway, Gangavaram (V),Kovur (M),SPSR Nellore (Dt), Andhra Pradesh, India 524137

BONAFIDE CERTIFICATE

This is to certify that the project work entitled “AUTOMATED STAR TYPE
CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA ” is a Bonafide
record done by [Link] (212U1A3302), [Link] (212U1A3307), [Link]
(212U1A3317), [Link] (212U1A3340) in the Department of Computer Science &
Engineering (AI&ML), Geethanjali Institute of Science and Technology, Nellore and is
submitted to Jawaharlal Nehru Technological University, Anantapur in the partial fulfilment for
the award of B. Tech degree in Computer Science & Engineering(AI&ML). This work has
been carried out under my supervision.

Dr. K. Sundeep Kumar Dr. P. Nagendra Kumar


Project Guide Professor and HOD
Department of CSE Department of CSE (AI&ML)
GIST, NELLORE GIST, NELLORE

Submitted for the Viva-Voce Examination held on

Internal Examiner External Examiner

(2021-2025)
ACKNOWLEDGEMENTS

The satisfaction that accompanies the successful completion of the project would be
incomplete without the people who made it possible. Their constant guidance and encouragement
crowned the efforts with success.

We express our deepest sense of gratitude to Mr. N. SUDHAKAR REDDY, [Link],


Secretary and Correspondent, Geethanjali Institute of Science and Technology, Nellore and
other members of Management for providing all the facilities needed for this work.

We owe our gratitude to Dr. G. SUBBA RAO, [Link], Ph.D., MIE, LMISTE, MSAE,
DIRECTOR, Geethanjali Institute of Science and Technology, Nellore, for his consistent help
and valuable suggestions.

Our special thanks to Dr. K. SUNDEEP KUMAR, PRINCIPAL, Geethanjali Institute


of Science and Technology, Nellore, for his timely suggestions and help during the progress of
project work.

Our sincere special thanks to Dr. P. NAGENDRA KUMAR, Professor & Head of the
Department Computer Science & Engineering(AI&ML), Geethanjali Institute of Science and
Technology, Nellore, for his keen interest, critical, constructive and skillful guidance and
constant encouragement throughout the course and for successful completion of project.

It is indeed our proud privilege to express our deep sense of gratitude and indebtedness
to our guide, Dr. K. SUNDEEP KUMAR., Professor Computer Science & Engineering ,
Geethanjali Institute of Science and Technology, Nellore, for his keen interest, critical,
constructive and skillful guidance and constant encouragement throughout the course and for
successful completion of project.

During the entire course of dissertation work, we received valuable academic inputs as
well as moral support from other departments, general teaching and non-teaching faculty at
GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY, Nellore. We were
motivated by the uphold and moral encouragement given to us by our beloved parents. Finally,
we wish to express our sincere thanks for all those who helped me directly or indirectly to
complete the work.

PROJECT ASSOCIATES
[Link] (212U1A3302)
[Link] (212U1A3307)
[Link] (212U1A3317)
[Link] (212U1A3340)
TABLE OF CONTENTS
ABSTRACT i
LIST OF FIGURES ii
LIST OF TABLES iii
LIST OF GRAPHS iv

LIST OF ABBREVIATIONS v

[Link] CONTENTS PAGE NO


1 INTRODUCTION 1

1.1 Machine Learning 2

1.2 Functions of Machine Learning 3

1.3 Classification 4
1.4 Star Classification 6
1.4.1 Key Applications 6
1.4.2 Traditional Star Classification 7
1.4.3 Star Classification using Machine Learning 8
1.4.4 Comparative Classification of Different Stars 8
2 LITERATURE SURVEY 10
2.1 Related Work 11
2.2 Research Gaps 18
2.3 Summary 19
3 SYSTEM REQUIREMENT SPECIFICATION 20

3.1 Hardware Requirements Specification 21

3.2 Software Requirements Specification 21

3.3 Technology Description 21


3.4 Features of Python 21
3.5 Libraries Used 22

4 SYSTEM ANALYSIS 25
4.1 Existing Systems and Its Disadvantages 26
4.2 Proposed Systems and Its Advantages 27
4.3 Dataset 30

4.3.1 Key Features in Dataset 31


4.4 Feasibility Study 31
4.4.1 Economical feasibility 31
4.4.2 Technical Feasibility 32
4.4.3 Operational Feasibility 32
5 SYSTEM DESIGN 33

5.1 Workflow of the system 34

5.2 Architectural Design 35

5.3 UML Diagrams 37

5.3.1 Class Diagram 37


5.3.2 Activity Diagram 38
5.3.3 Sequence Diagram 40
5.3.4 Use Case Diagram 41
6 TESTING 42
7 RESULTS AND SCREENSHOTS 44

7.1 Evaluation Metrics 45


7.2 Result Comparison 47
7.3 Screenshots 54
8 CONCLUSION 59
9 FUTURE SCOPE 61
10 BIBLIOGRAPHY 63
ABSTRACT
Galaxies, vast cosmic structures of stars, gas, and dark matter, shape the universe’s evolution,
with stars playing a crucial role in galactic dynamics, star formation, planetary systems, and cosmic
radiation. Understanding star classification is essential for studying stellar populations and galactic
evolution. Traditionally, classification has relied on manual methods, which are subjective, inefficient,
and unable to scale with the vast data generated by modern telescopes. As astronomical data increases
in volume and complexity, automation becomes crucial. This work implements machine learning to
automate star classification, enhancing speed, consistency, and scalability while reducing errors and
human dependency. Using a NASA-sourced dataset containing spectroscopic data such as
temperature, luminosity, and radius, the Random Forest Classifier is applied as the proposed system,
leveraging multiple decision trees for robust performance and high accuracy. Stars are categorized into
six types: Red Dwarf, Brown Dwarf, White Dwarf, Main Sequence, Super Giants, and Hyper Giants.
This automated approach improves efficiency, eliminates human bias, and scales to vast datasets,
facilitating rapid star categorization, aiding exoplanet detection, mapping stellar nurseries, and
supporting cosmic studies, ultimately advancing our understanding of the universe.

i
LIST OF FIGURES
[Link] FIGURE NO FIGURE NAME PAGE NO
1 1.1 Machine Learning 2
2 1.2 Classification Algorithms 5
3 1.3 Types of Stars 6
4 4.1 Random Forest Classifier 29
5 4.2 NASA Dataset 30

6 5.1 Workflow of the system 34


7 5.2 Architectural Design 35

8 5.3 Class Diagram 38


9 5.4 Activity Diagram 39

10 5.5 Sequence Diagram 40

11 5.6 Use Case Diagram 41


12 7.2 UI of Research Work 54

13 7.3 Dataset Uploading 54


14 7.4 Dataset Uploaded 55

15 7.5 Train Test Splitting 55


16 7.6 Existing LC Performance Analysis 56

17 7.7 Existing NBC Performance Analysis 56

18 7.8 Existing KNN Performance Analysis 57


19 7.9 Proposed RFC Performance Analysis 57

20 7.10 Performance Evaluation Summary 58


21 7.11 Test Data Results of RFC 58

ii
LIST OF TABLES

[Link] TABLE NO TABLE NAME PAGE NO


1 1.1 Comparative Classification of Different Star Types 9
2 2.1 Research Gaps 18
3 7.1 Performance Comparison of Various Algorithms 48
4 7.2 Logistic Classifier Classification Report 48
5 7.3 Naïve Bayes Classifier Classification Report 49
6 7.4 K-Nearest Neighbor Classification Report 50

7 7.5 Random Forest Classifier Classification Report 50


8 7.6 Analysis of Confusion Matrices 53

iii
LIST OF GRAPHS

[Link] GRAPH NO GRAPH NAME PAGE NO


1 7.1 a Confusion Matrix of Logistic Classifier 52

2 7.1 b Confusion Matrix of Naïve Bayes Classifier 52


3 7.1 c Confusion Matrix of KNN Classifier 52
4 7.1 d Confusion Matrix of Random Forest Classifier 52

iv
LIST OF ABBREVIATIONS

[Link] ACRONYM ABBREVIATIONS

1 AI Artificial Intelligence
2 ML Machine Learning

3 DL Deep Learning
4 LC Logistic Classifier

5 NBC Naïve Bayes Classifier

6 RFC Random Forest Classifier

7 KNN K-Nearest Neighbors

8 CNN Convolution Neural Network

9 ANN Artificial Neural Network

10 SVM Support Vector Machine

11 ECNN Ensemble Convolution Neural Network

12 UML Unified Modeling Language

v
AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-1
INTRODUCTION

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY Page |1

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

1. INTRODUCTION
1.1 MACHINE LEARNING
Machine Learning (ML) is a subset of Artificial Intelligence (AI) that focuses on developing
algorithms capable of learning from and making decisions based on data. Unlike traditional
programming, where explicit instructions are provided, ML models learn from patterns within
datasets to improve performance over time. ML has become a powerful tool across numerous
domains, including healthcare, finance, marketing, cybersecurity, and space exploration.
ML systems rely on large amounts of data and computational power to build models that
generalize patterns and make accurate predictions. The primary goal of machine learning is to
minimize human intervention in complex problem-solving by allowing systems to adapt and
improve with experience.

Fig 1.1. Machine Learning

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY Page |2

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Some key characteristics of ML include:


 Self-learning: ML models can refine their accuracy as they process more data.
 Adaptability: Models can adjust to new information and changing environments.
 Automation: Reduces human effort in analyzing vast datasets.
 Scalability: Efficiently processes massive amounts of data.
Machine learning has significantly advanced in recent years, with breakthroughs in deep
learning, reinforcement learning, and neural networks enabling applications such as self-driving
cars, real-time translation, and automated scientific discoveries.
1.2 FUNCTIONS OF MACHINE LEARNING
Machine learning encompasses various tasks that allow computers to process, analyze, and
interpret data effectively. These tasks are categorized into several key functions, each serving
specific purposes:
1.2.1 Prediction
Prediction involves forecasting future trends or outcomes based on historical data. It
is widely used in industries such as finance, healthcare, and meteorology. Examples include:
 Stock Market Analysis: Predicting stock price fluctuations.
 Weather Forecasting: Using past weather patterns to anticipate future conditions.
 Disease Prediction: Identifying potential health risks based on patient history.
1.2.2 Classification
Classification is a supervised learning technique where data is assigned to predefined
categories based on learned features. Some real-world examples include:
 Spam Detection: Classifying emails as spam or not spam.
 Medical Diagnosis: Identifying diseases based on symptoms and test results.
 Fraud Detection: Recognizing fraudulent transactions in banking systems.
1.2.3 Clustering
Clustering groups similar data points without predefined labels. It is particularly
useful in:
 Customer Segmentation: Grouping customers based on purchasing behavior.
 Image Segmentation: Dividing images into different regions for better analysis.
 Social Network Analysis: Identifying communities within large social networks.

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY Page |3

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

1.2.4 Anomaly Detection


Anomaly detection identifies outliers or unusual patterns in data. It is essential for:
 Cybersecurity: Detecting unauthorized access attempts and potential threats.
 Industrial Maintenance: Identifying failures in machinery before breakdowns occur.
 Financial Security: Spotting abnormal spending patterns to prevent fraud.
1.2.5 Recommendation Systems
Recommendation systems suggest personalized content based on user preferences.
These systems are commonly used in:
 E-commerce: Recommending products based on past purchases (e.g., Amazon).
 Streaming Services: Suggesting movies, shows, or songs (e.g., Netflix, Spotify).
 Online Learning Platforms: Tailoring courses to user preferences and skills.
1.3 CLASSIFICATION
Classification is one of the most widely used tasks in machine learning. It involves predicting
a categorical label based on input data. The classification process follows these steps:
1. Data Collection: Gathering labeled datasets.
2. Feature Extraction: Identifying relevant characteristics from the data.
3. Model Training: Teaching the ML model to recognize patterns.
4. Prediction: Using the trained model to classify new data points.
5. Evaluation: Measuring accuracy, precision, recall, and F1-score to assess model
performance.
Types of Classification Algorithms
Classification algorithms fall into different categories based on their methodology:
 Linear Classification Algorithms
 Tree-Based Classification Algorithms
 Probabilistic Classification Algorithms
 Instance-Based Classification Algorithms
 Neural Network-Based Classification Algorithms

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY Page |4

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Fig 1.2. Classification Algorithms

1.3.1 Linear Classification Algorithms


 Logistic Classifier: Uses a mathematical function to model the probability of a particular
class.
 Support Vector Machines (SVM): Finds the optimal decision boundary that best
separates different classes.
1.3.2 Tree-Based Classification Algorithms
 Decision Tree: A flowchart-like structure that splits data into categories based on decision
rules.
 Random Forest: An ensemble of multiple decision trees for improved accuracy.
 Gradient Boosting (XGBoost, LightGBM, CatBoost): Advanced boosting algorithms
for high-performance classification tasks.

1.3.3 Probabilistic Classification Algorithms


 Naïve Bayes: Based on Bayes’ theorem, assuming feature independence (commonly used
in spam filtering and text classification).
1.3.4 Instance-Based Classification Algorithms
 K-Nearest Neighbors (KNN): Assigns labels based on the majority class of KNN.

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY Page |5

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

1.3.5 Neural Network-Based Classification Algorithms


 Artificial Neural Networks (ANNs): Modeled after the human brain to recognize complex
patterns.
 Convolutional Neural Networks (CNNs): Specialized for image and video classification.
 Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM):
Designed for sequential data, such as text and speech.
Classification plays a crucial role in various domains, including healthcare, finance,
astronomy, and industrial automation.
1.4 STAR CLASSIFICATION
Star classification is a vital aspect of astrophysics, helping scientists understand the life cycles
of stars and the structure of galaxies. Machine learning enhances this process by automating
classification, allowing for the efficient analysis of massive datasets collected from telescopes and
space missions.

Fig 1.3. Types of Stars


1.4.1 Key Applications
1. Exoplanet Detection
By identifying stars most likely to host exoplanets, astronomers can focus their search
on promising candidates. For example, G and K-type stars have been found to host many

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY Page |6

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

habitable-zone planets, making classification crucial for planetary research.


2. Stellar Population Studies
Classifying stars helps scientists map the distribution of different types of stars across
galaxies. This information provides insights into the formation and evolution of galaxies,
their chemical compositions, and their dynamic structures.
3. Mapping Stellar Nurseries
Stellar nurseries are regions where new stars are formed. By identifying young stars
and their characteristics, astronomers can study the conditions that lead to star formation,
contributing to our understanding of cosmic evolution.
4. Cosmic Studies and Stellar Evolution
Star classification allows researchers to track how stars evolve over time. By
analyzing spectral data, scientists can determine whether a star is in its main sequence,
giant, or white dwarf stage. This knowledge aids in understanding the overall lifecycle of
stars and their role in enriching the universe with heavy elements.
5. Black Hole and Neutron Star Studies
Machine learning models can classify high-energy stellar objects such as neutron stars
and black holes based on their emission spectra and other properties. This helps in studying
extreme astrophysical phenomena and their effects on surrounding matter.
6. Space Missions and Telescope Data Analysis
NASA’s space telescopes, such as the Hubble Space Telescope and the James Webb
Space Telescope, collect vast amounts of data on stars. Automated star classification using
ML enables researchers to process and categorize this data more efficiently, leading to
faster discoveries.

1.4.2 Traditional Star Classification


Stars have traditionally been classified based on their spectral characteristics—
specifically their color, temperature, and spectral lines observed through optical
spectroscopy. This method analyses the light emitted by a star, splitting it into a spectrum to
identify patterns unique to different elements and temperatures.
The most widely accepted traditional system is the Harvard Spectral
Classification, refined by the Morgan–Keenan (MK) system, which categorizes stars into

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY Page |7

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

spectral types:
 O, B, A, F, G, K, M — from the hottest and most massive (O-type, blue) to the coolest
and smallest (M-type, red).
 Each type is subdivided (e.g., G2, K5) for more precision.
 Luminosity classes (I to V) indicate the star’s size and brightness, e.g., I for super
giants, V for main-sequence stars like our Sun.
1.4.3 Star Classification Using Machine Learning
Modern astrophysics leverages machine learning (ML) to automate and enhance the star
classification process. Unlike traditional methods that rely heavily on manual spectral
analysis, ML models can efficiently process large astronomical datasets, uncovering patterns
and features beyond human perception.
Machine learning systems are trained on labelled datasets containing stellar parameters,
enabling them to learn classification rules and make predictions on unseen data. These
parameters typically include:
 Temperature
 Luminosity
 Radius
 Absolute Magnitude
 Color Index (B–V)
 Spectral Type (used as labels in supervised learning)
1.4.4 Comparative Classification of Different Star Types
The classification of stars is based on key physical parameters such as temperature,
luminosity, radius, spectral type, color, and absolute magnitude. These parameters help
astronomers distinguish between various stages of stellar evolution and understand the
properties of celestial objects.
This comparative chart summarizes the primary characteristics of major star types:
 Red Dwarfs: These are small, cool stars with long lifespans. They fall in the spectral
class M and emit low luminosity.
 White Dwarfs: Representing the final stage of low-mass stars, they are dense stellar
remnants with no ongoing fusion, typically very hot but faint.

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY Page |8

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

 Main Sequence Stars: These include the Sun and form the majority of stars in the
universe. They range widely in temperature and luminosity, undergoing hydrogen fusion
in their cores.
 Giant Stars: Evolved from main sequence stars, giants are larger and brighter, typically
found in spectral types K and M.
 Supergiants: These stars are extremely massive and luminous but have shorter lifespans.
They exhibit a wide temperature range and span multiple spectral classes.
 Brown Dwarfs: Substellar objects that do not sustain hydrogen fusion, often considered
failed stars. They have very low temperatures and luminosity.

Table 1.1. Comparative Classification of Different Star Types

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY Page |9

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-2
LITERATURE SURVEY

GEETHANJALI INSTITUTE OF SCIENCE AND TECHNOLOGY P a g e | 10

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

2. LITERATURE SURVEY

2.1 RELATED WORK


[1] Zera atgari, Fatemeh Zahra, Fatemeh Hafezianzadeh, Yanxia Zhang, Liquan Mei, Ashraf
Ayubinia, Amin Mosallanezhad, and Jingyi Zhang. “Machine learning-based photometric
classification of galaxies, quasars, emission-line galaxies, and stars”

In this paper, they explore the application of machine learning methods for classifying
astronomical sources using photometric data, including normal and emission line galaxies
(ELGs; star forming, starburst, AGN, broad-line), quasars, and stars. They utilized samples from
Sloan Digital Sky Survey (SDSS) Data Release 17 (DR17) and the ALLWISE catalogue, which
contain spectroscopically labelled sources from SDSS. Our methodology comprises two parts.
First, they conducted experiments, including three-class, four-class, and seven-class
classifications, employing the Random Forest (RF) algorithm. This phase aimed to achieve
optimal performance with balanced data sets. In the second part, they trained various machine
learning methods, such as k-nearest neighbors (KNN), RF, XGBoost (XGB), voting, and
artificial neural network (ANN), using all available data based on promising results from the first
phase. They achieved an accuracy of 98.83% from XGBoost.

[2] Cody, S. E., Scher, S., McDonald, I., Zijlstra, A., Alexander, E., & Cox, N. L. J. (2024).
“Machine learning based stellar classification with highly sparse photometry data”

In this paper, a combination of the multi-class multi-label machine learning method


XGBoost and the PySSED spectral-energy-distribution fitting algorithm was used to classify
stars into nine different classes based on their photometric data. The classifier was trained on
subsets of the SIMBAD database. The study addressed challenges such as high data sparsity and
class imbalance, demonstrating the necessity of automated classification methods for handling
large-scale stellar surveys efficiently. They achieved an accuracy of 88.83%.

[3] Savyanavar, Amit Sadanand, Nikhil Mhala, and Shiv H. Sutar. “Star Galaxy Classification
Using Machine Learning Algorithms and Deep Learning”

In this paper, the star-galaxy dataset was classified into two categories—star and galaxy—
using machine learning algorithms, and their classification performance was compared. It was
observed that the random forest classifier achieved an accuracy of 78%, outperforming other ML

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 11

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

classifiers. To further improve accuracy, a Convolutional Neural Network (CNN) model was
proposed, achieving 92.44% accuracy. Since the CNN model automatically extracts features, it
demonstrated superior classification performance compared to traditional machine learning
approaches.
[4] Tamez Villarreal, J., & Barton, S. (2023). “ Stellar Classification based on Various Star
Characteristics using Machine Learning Algorithms”

In this paper, the authors discuss how the task of stellar classification can be tedious and
lengthy when done manually. They propose expediting stellar classification by creating an
artificial intelligence model to automate the process. As humanity continues to explore the
frontier of the observable universe, automating time-intensive tasks like stellar classification
becomes crucial. The current stellar classification model effectively categorizes stars for research
purposes, aiding in the study of their distribution across the universe. By automating this process,
researchers can allocate more time to exploring the limits of our understanding of space and the
universe, leading to more efficient and advanced astronomical discoveries. In this work they used
various ML Models like Decision Tree, Ridge Classifier and Random Forest and achieved an
accuracy of 94%.

[5] Haghighi, M. H. Z. (2023). “Analyzing Astronomical Data with Machine Learning


Techniques (Version 1)”

In this paper, the authors discuss how the task of stellar classification can be tedious and
lengthy when done manually. They propose expediting stellar classification by creating an
artificial intelligence model to automate the process. As humanity continues to explore the
frontier of the observable universe, automating time-intensive tasks like stellar classification
becomes crucial. The current stellar classification model effectively categorizes stars for research
purposes, aiding in the study of their distribution across the universe. Popular classification
models including logistic classifier, decision tree, random forest, support vector machine (SVM),
multilayer perceptron, naive bayes, neural networks have proven to be efficient and accurate
applied to many industrial and scientific problems. They achieved an accuracy of 96.9% from
Logistic Regression, 99.3% from Neural Networks.

[6] Qi, Z. (2022). “ Stellar Classification by Machine Learning”

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 12

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

In this paper, the authors discuss how the task of stellar classification can be tedious and
lengthy when done manually. They propose expediting stellar classification by creating an
artificial intelligence model to automate the process. As humanity continues to explore the
frontier of the observable universe, automating time-intensive tasks like stellar classification
becomes crucial. The paper has used three algorithms (Decision Tree, Random Forest and
Support Vector Machine) to build prediction models. By automating this process, researchers
can allocate more time to exploring the limits of our understanding of space and the universe,
leading to more efficient and advanced astronomical discoveries. They achieved an accuracy of
98%.
[7] Zhao, Z., Wei, J., & Jiang, B. (2022). “Automated Stellar Spectra Classification with
Ensemble Convolutional Neural Network”

In this study, an ensemble convolutional neural network (ECNN) was developed to


enhance the classification accuracy of stellar spectra from the Sloan Digital Sky Survey (SDSS)
Data Release 16. The ECNN comprises six distinct convolutional neural network classifiers, each
trained to recognize spectral patterns. By integrating the outputs of these classifiers, the ECNN
achieved a classification accuracy of 95.0%, surpassing traditional methods like principal
component analysis and support vector machines.

[8] Dafonte, C., Rodríguez, A., Manteiga, M., Gómez, Á., & Arcay, B. (2020). “A Blended
Artificial Intelligence Approach for Spectral Classification of Stars in Massive Astronomical
Surveys”

In this paper, the authors analyze and compare the sensitivity and suitability of various
artificial intelligence techniques applied to the Morgan–Keenan (MK) system for stellar
classification. The MK system, based on a sequence of spectral prototypes, classifies stars
according to their effective temperature and luminosity by examining their optical stellar spectra.
This study presents the methodology and results of different intelligent models developed in an
ongoing stellar classification project, including fuzzy knowledge-based systems,
backpropagation, radial basis function (RBF) networks, and Kohonen artificial neural networks.
They achieved the confidence level of 0.99.
[9] Kyritsis, E., Maravelias, G., Zezas, A., Bonfini, P., Kovlakas, K., & Reig, P. (2022). “ A new
automated tool for the spectral classification of OB stars”

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 13

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

In this paper, the authors address the necessity of an automated approach to spectral
classification as the availability of spectroscopic surveys continues to expand. Given the
significance of massive stars, identifying their phenomenological parameters, such as spectral
type, is crucial as these serve as proxies for their physical properties, including mass and
temperature. This study focuses on leveraging the Random Forest (RF) algorithm to develop a
tool for the automated spectral classification of OB-type stars based on their sub-types. They
achieved an accuracy of 70%.

[10] Kuntzer,T., Tewes, M., & Courbin, F. (2016). “Stellar classification from single-band
imaging using machine learning”

In this paper, the authors explore the classification of stars into spectral types using the
shape of their diffraction pattern in a single broad-band image, a method of particular interest for
space-based imaging surveys. They propose a supervised machine learning approach that
incorporates principal component analysis (PCA) for dimensionality reduction, followed by
artificial neural networks (ANNs) to estimate spectral types. The analysis is conducted using
image simulations designed to replicate observations from the Hubble Space Telescope (HST)
Advanced Camera for Surveys (ACS) in the F606W and F814W bands, as well as the Euclid VIS
imager. They achieved the success rate of 0.99 and F1 score of 0.78.

[11] Cody, Seán Enis, Sebastian Scher, Iain McDonald, Albert Zijlstra, Emma Alexander, and
Nick Cox. (2024) “Machine learning based stellar classification with highly sparse
photometry data.”

In this paper, the authors explore the use of machine learning for stellar classification,
addressing the need for automated methods in large-scale astronomical surveys. They employ
Decision Tree, Random Forest, and Support Vector Machine algorithms to classify stars,
galaxies, and quasars while also analyzing artificial intelligence techniques for the Morgan–
Keenan (MK) system. Additionally, they develop a Random Forest-based tool for OB-type stars
and utilize PCA with artificial neural networks for classification based on diffraction patterns.
Finally, XGBoost and PySSED are applied to classify stars using photometric data, addressing
challenges like data sparsity and class imbalance.

[12] Huichaqueo, M. O., & Orrego, R. M. (2022). “Automatic Spectral Classification of Stars
using Machine Learning: An Approach based on the use of Unbalanced Data”

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 14

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

In this paper, the authors present a machine learning-based method for the automatic
spectral classification of stars using data from the latest SDSS release. They propose a
combinatorial approach, integrating spectral data, derived stellar parameters, and calculated
values to create classification patterns. A Random Forest model is developed to classify stars into
six spectral types: A, F, G, K, M, and Carbon stars. To address data imbalance, the model is
trained using original, under-sampled, and over-sampled datasets. Experimental results indicate
that combining multiple data sources improves classification accuracy, with models trained on
augmented data performing best.

[13] Tamez Villarreal, J., & Barton, S. (2023). “Stellar Classification based on Various Star
Characteristics using Machine Learning Algorithms”

In this paper, , the authors present an artificial intelligence-based approach to automate


stellar classification, a traditionally time-intensive task. By leveraging machine learning, the
study aims to enhance research on stellar distribution while allowing astronomers to focus on
broader explorations of the universe. Using a dataset with numerical and categorical features, a
supervised learning approach was applied to train and test Decision Tree, Random Forest, Ridge,
and Support Vector Classifiers. The Decision Tree and Random Forest models achieved the
highest accuracy, approximately 94%. Despite data limitations, the study demonstrates the
feasibility of automated stellar classification, highlighting the need for more comprehensive
datasets in future research.

[14] Qi, Z. (2022). “Stellar Classification by Machine Learning”

In this paper, the authors explore the application of machine learning in astronomy, where
it has been widely used for data processing and predictive modeling. The study employs three
algorithms—Decision Tree, Random Forest, and Support Vector Machine—to develop
classification models for distinguishing stars, galaxies, and quasars. A comparative analysis of
these models reveals that the Random Forest algorithm achieves the highest prediction accuracy
of approximately 98%, demonstrating superior performance in both accuracy and computational
efficiency.

[15] Kateryna, M., & Nataliia, F. (2024). “Peculiarities of methods for determining the class of
stars from photographs using neural networks and machine learning”

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 15

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

In this paper, the authors explore the development of a star classification algorithm using
artificial intelligence based on spectral analysis. The study investigates the application of neural
networks and machine learning methods for automated classification by analyzing stellar
characteristics. With the increasing volume of astronomical data, effective automated methods
are essential. Various machine learning models, including Random Forest, K-Nearest Neighbors,
Gaussian Naive Bayes, and Support Vector Machine, are utilized. Results indicate that K-Nearest
Neighbors and Support Vector Machine achieve the highest classification accuracy, confirming
their effectiveness.

[16] Zhang, J., Lian, J., Yi, Z., Yang, S., & Shan, Y. (2021). “High-Accuracy Guide Star
Catalogue Generation with a Machine Learning Classification Algorithm”

In this paper, the authors investigate methods to enhance the guide star catalogue (GSC)
for improving star identification in satellite attitude determination using star sensors (SSR).
Accurate attitude measurement is crucial for efficient laser link docking in gravitational wave
detection missions. The study examines the relationship between the number of stars in the field
of view, brightness, and sensor accuracy. Various machine learning models, including Decision
Trees, K-Nearest Neighbors, Support Vector Machine, and Neural Networks, are assessed for
GSC optimization. Results indicate that the K-Nearest Neighbors method generates the most
effective GSC, offering superior storage efficiency, uniformity, and completeness for high-
accuracy spacecraft applications.

[17] Kadam, S. S., Chaudhari, K. S., Chaudhari, J. V., Mahajan, T. N., & Kosamkar, P. (2024).
“Star Galaxy Classification Using Deep Learning”

In this paper, the authors present a deep learning-based approach for star and galaxy
classification using Convolutional Neural Networks (CNNs) and the VGG16 architecture. By
leveraging VGG16’s hierarchical feature extraction, the model captures intricate patterns in
astronomical images. A labeled dataset from Kaggle is used for training and evaluation, with
transfer learning applied to fine-tune the model. The VGG16 approach achieves 95.56%
accuracy, while CNN attains 94.15%, demonstrating the effectiveness of deep learning in
distinguishing stars from galaxies.

[18] Hosenie, Z., Lyon, R., Stappers, B., Mootoovaloo, A., & McBride, V. (2020).“ Imbalance
learning for variable star classification”

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 16

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

In this paper, the authors address the challenge of accurately classifying variable stars into
subtypes using machine learning, which is hindered by class imbalance. Building on previous
work with a hierarchical classifier that outperformed traditional methods on Catalina Real-Time
Survey (CRTS) data, they further enhance performance using data augmentation techniques.
Three methods—RASLE, GpFit, and SMOTE—were applied, improving classification accuracy
by 1–4%. The GpFit method showed the highest classification rate, highlighting the need for
better-labeled datasets and enhanced feature extraction.

[19] Hinners, T. A., Tat, K., & Thorp, R. (2018). “ Machine Learning Techniques for Stellar
Light Curve Classification”

In this paper, the authors apply machine learning techniques to predict and classify stellar
properties using noisy and sparse time-series data from Kepler light curves. Over 94 GB of data
from the Mikulski Archive for Space Telescopes (MAST) is preprocessed to classify stars based
on 10 physical properties using both representation learning and feature engineering. While long
short-term memory networks yielded no successful predictions, feature engineering proved
effective, achieving low error (∼2%-4%) for stellar properties and ∼75% accuracy in transit
classification, demonstrating the potential for future astrophysical analysis.

[20] Hoffman, D. I., Harrison, T. E., & McNamara, B. J. (2009). “AUTOMATED VARIABLE
STAR CLASSIFICATION USING THE NORTHERN SKY VARIABILITY SURVEY”

This paper presents the classification of 4,659 variable objects from the Northern Sky
Variability Survey into five distinct variable star classes: Algol/β Lyr systems, W Ursae Majoris
variables, long-period variables, RR Lyr pulsating variables, and short-period δ Scuti stars.
Classification was performed using Fourier coefficients, period analysis, and light-curve
properties, followed by manual verification. The study provides coordinates, periods, infrared
colors, amplitude variations, and prior classifications, excluding 548 previously identified
Algols.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 17

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

2.2 RESEARCH GAPS


Table 2.1. Research Gaps

REF
AUTHORS(YEAR) WORK DONE OBSERVATIONS
NO

[1] Zera atgari, et al.(2024) KNN, RF, XGBoost, ANN Accuracy = 98.93%

[2] Cody, et al.(2024) XGBoost, PySSED Accuracy = 88.83%

[3] Savyanavar, et al. (2023) RF, CNN Accuracy of RF is 78%

Accuracy of CNN is 98.4%

[4] Tamez Villarreal, et al. Decision Tree, RF, Ridge Accuracy = 94%
(2023) Classifier and SVM

[5] Haghighi, et al. (2023) Logistic Regression, RF, Accuracy of Logistic


DTC and Multilayer Regression model is 96.9%
Perceptron Accuracy of Neural
Network is 99%

[6] Qi Z, et al.(2022) Decision Tree, RF, SVM Accuracy=98%

[7] Zhao Z, et a;.(2022) ECNN Accuracy=95%

[8] Dafonte C, et al. (2020) ANN Confidence level of 0.99

[9] Kyritsis, et al. (2022) Random Forest Accuracy of 70%

[10] Kuntzer, et al. (2016) ANN Success Rate of 0.99

F1 Score of 0.78

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 18

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

2.3 SUMMARY
From the literature survey, several drawbacks had been identified in existing star
classification models. Many studies had struggled with issues such as data imbalance, sensitivity
to noisy observations, and high dependency on handcrafted features. Some models had exhibited
limited generalizability when applied to diverse datasets, while others had faced computational
inefficiencies due to the complexity of deep learning architectures. Additionally, the need for
extensive preprocessing and feature engineering had posed challenges in automating the
classification process effectively.

To overcome these limitations, this work aimed to implement advanced techniques such
as hyperparameter tuning, feature selection optimization, and data augmentation methods. By
fine-tuning model parameters and employing more robust machine learning architectures,
classification accuracy and efficiency could be improved. Additionally, leveraging deep learning
models with automated feature extraction capabilities would reduce dependency on manual
feature engineering. The proposed approach sought to enhance adaptability across various
astronomical datasets while minimizing computational overhead, ultimately improving the
reliability of automated star classification.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 19

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-3
SYSTEM
REQUIREMENT
SPECIFICATION

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 20

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

3. SYSTEM REQUIREMENT SPECIFICATION

3.1 HARDWARE REQUIREMENTS SPECIFICATION


 Processor: Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz
 RAM: 4 GB
 HDD: 1 TB
 Input Devices: Keyboard, Mouse

3.2 SOFTWARE REQUIREMENTS SPECIFICATION

 Operating System: Windows 10 pro

 Programming Language: Python 3.11

 Coding Platform: VS Code , Jupyter Lab

 Modules: Pandas, NumPy, Matplotlib, Scikit-Learn

3.3 TECHNOLOGY DESCRIPTION


The project “Automated Star Type Classification with Machine Learning using NASA Data”
focuses on developing a machine learning model to classify stars into different types based on
their physical and spectral characteristics. Leveraging supervised learning techniques, the study
aims to analyze stellar data and accurately categorize stars into predefined classes. Through
comprehensive data preprocessing and feature selection, the project ensures optimal model
performance. By employing algorithms like Logistic Classifier, Random Forest, KNN, Naïve
Bayes Classifier, the study seeks to enhance classification accuracy while minimizing
computational complexity. Additionally, visualization methods, such as scatter plots and
heatmaps, help illustrate patterns and correlations within the dataset. This research contributes to
the field of astrophysics by automating the classification process, enabling a deeper understanding
of stellar properties and their evolutionary significance.

3.4 FEATURES OF PYTHON


Python offers numerous advantages, making it a top choice for developers across various
domains, including machine learning and data analysis. Its syntax emphasizes readability,

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 21

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

allowing for clear and concise code with minimal complexity. Additionally, Python provides an
extensive standard library, reducing external dependencies and enhancing development
efficiency. In this project, key libraries such as NumPy and pandas facilitate numerical
computation and data manipulation, while matplotlib, seaborn, and Plotly enable effective data
visualization. Machine learning tasks, including classification and data balancing, are handled
using Sklearn and imblearn. Moreover, Joblib and pickle simplify model serialization, ensuring
efficient storage and retrieval. The tqdm library enhances user experience by providing progress
tracking for iterative operations.

Python’s cross-platform compatibility ensures seamless execution across different operating


systems without modification. Additionally, the threading and socket server modules enhance
performance in concurrent applications, while tkinter supports GUI development for interactive
user interfaces. The integration of PIL further extends Python’s capabilities by enabling image
processing. Supported by a large and active community, Python benefits from extensive
documentation, tutorials, and open-source resources, making it accessible for learning and
troubleshooting. With its versatility and a rich ecosystem of libraries—including those used in this
project—Python remains a powerful tool for data analysis, visualization, machine learning, and
automation.

3.5 LIBRARIES USED


NumPy
Although we haven't explicitly imported NumPy, its presence underpins numerical
operations within various libraries, including Pandas. NumPy's support for multi-dimensional
arrays and mathematical functions enhances efficiency in data manipulation, even if its
functions aren't directly called in our code snippets.
Pandas
Pandas is a powerful Python library for data manipulation and analysis, offering versatile
tools and data structures for handling structured data efficiently. It provides functionalities for
reading and writing various data formats, performing data preprocessing tasks, and conducting
exploratory data analysis. With its intuitive and expressive syntax, Pandas simplifies data handling
tasks, making it a preferred choice for data scientists and analysts.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 22

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

pd.read_csv()
The pd.read_csv() function in Pandas is used to read data from a CSV (Comma-Separated
Values) file into a Data Frame. In our project, we use it to load datasets containing stellar
characteristics, such as temperature, luminosity, radius, and spectral classification, for further
analysis and model training.
head() and tail()
The head() function displays the first few rows of the Data Frame, while tail() returns the
last few rows. These functions are useful for quickly inspecting the dataset structure and verifying
its integrity after loading.
shape
The shape attribute provides the number of rows and columns in the dataset. This helps in
understanding the dataset size and ensuring that all necessary features are available for model
training.
isnull()
The isnull() function identifies missing values in the dataset. Handling missing values is
crucial in our project since incomplete data can negatively impact the accuracy of our
classification model.
Matplotlib and Seaborn
Matplotlib and Seaborn are used for data visualization, enabling us to explore relationships
between stellar features. Matplotlib allows us to create line plots, scatter plots, histograms, and
bar charts. Seaborn enhances visualization aesthetics and provides built-in statistical plotting
functions.
bar()
Matplotlib's bar() function is used to plot the frequency distribution of different star types,
helping us understand class imbalances before model training.
Scikit-learn
Scikit-learn provides essential machine learning tools for preprocessing data, training
models, and evaluating performance.
StandardScaler
The StandardScaler class standardizes numerical features by removing the mean and

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 23

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

scaling to unit variance. This ensures that our model treats all features equally, improving
accuracy.
train_test_split()
This function splits the dataset into training and testing sets, allowing us to evaluate model
performance effectively.
accuracy_score()
The accuracy_score() function evaluates how well our model classifies stars based on their
attributes.
Keras and TensorFlow
Keras and TensorFlow power our deep learning models for star classification.
Sequential()
We use the Sequential() function to construct a neural network with multiple layers,
allowing for efficient classification of stars based on their features.
compile()
The compile() function is used to configure the model’s optimizer, loss function, and
evaluation metrics.
add()
The add() function in Keras is used to insert layers such as Dense layers, which help the
network learn complex patterns in stellar data.
fit()
The fit() function trains the model using our dataset, adjusting weights to minimize
classification errors.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 24

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-4
SYSTEM ANALYSIS

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 25

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

[Link] ANALYSIS

4.1 EXISTING SYSTEM AND ITS DISADVANTAGES


The existing system architecture for star type classification begins with the NASA Star Type
Dataset, which includes vital stellar attributes such as temperature, luminosity, and radius. After
gathering this data, a pre-processing phase is carried out involving data cleaning, normalization,
and feature scaling, followed by splitting the data into training and testing sets to evaluate model
performance accurately. The system then applies machine learning algorithms to classify stars into
their respective types. The three existing algorithms used are:
1. Logistic Classifier
2. Naïve Bayes Classifier
3. K-Nearest Neighbors (KNN)
1. Logistic Classifier
linear model used for classification that estimates the probability of a data point belonging
to a class using a logistic (sigmoid) function. It works best when the relationship between input
features and the target class is linear.
Algorithm:
Step 1: Initialize model weights.
Step 2: Compute the weighted sum of input features.
Step 3: Apply the sigmoid function to get the probability.
Step 4: Classify using a threshold (usually 0.5).
Step 5: Optimize using gradient descent by minimizing the loss function.
2. Naïve Bayes Classifier
A probabilistic classifier based on Bayes’ Theorem, assuming feature independence. It is
simple, fast, and performs well on high-dimensional data.
Algorithm:
Step 1: Calculate prior probabilities for each class.
Step 2: Calculate likelihoods of features for each class.
Step 3: Apply Bayes’ Theorem to compute posterior probabilities.
Step 4: Choose the class with the highest posterior probability.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 26

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

3. K-Nearest Neighbors (KNN)


A non-parametric algorithm that classifies new data points based on the majority class of
their k nearest neighbors in the feature space. It’s simple and effective for small datasets.
Algorithm:
Step 1: Select the value of k (number of neighbors).
Step 2: Measure distances between the test sample and all training samples.
Step 3: Identify the k nearest neighbors.
Step 4: Determine the most frequent class among these neighbors.
Step 5: Assign this class to the test sample.
DISADVANTAGES OF EXISTING SYSTEM:
 Data Availability Constraints: The sentiment analysis system relies on historical Reddit data,
which may not always be balanced or fully representative of diverse viewpoints across different
time periods. Variations in dataset availability can impact the accuracy of sentiment
classification.
 Contextual Limitations: While VADER is optimized for social media sentiment analysis, it
may struggle with sarcasm, slang, and ambiguous expressions, leading to potential
misinterpretations in sentiment classification.
 Temporal Bias and Generalization Issues: Sentiment trends observed in the dataset may be
influenced by external factors such as news events, policy changes, or shifting public discourse,
which can introduce biases. The system may not always generalize well when applied to newer
Reddit discussions that differ from the training data distribution.
 Visualization Challenges: Despite leveraging Matplotlib and Seaborn for sentiment
distribution analysis, visual interpretations may sometimes be affected by data inconsistencies
or outliers, potentially impacting trend analysis.
4.2 PROPOSED SYSTEM AND ITS ADVANTAGES
Stars, key building blocks of the universe, vary in temperature, luminosity, and mass, which
determine their classification and evolution. While traditional methods like spectral analysis and the
Hertzsprung-Russell diagram have long been used, the surge in astronomical data has made manual
classification inefficient. To address this, our project uses the NASA Star Dataset from Kaggle and
applies machine learning to automate and improve classification accuracy. We compare existing

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 27

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

algorithms—Logistic Classifier, KNN, and Naïve Bayes—with our proposed model, Random Forest
Classifier. The Random Forest enhances performance by capturing complex patterns, handling high-
dimensional data, and reducing overfitting through its ensemble of decision trees. This approach
ensures more accurate and reliable classification, aiding both stellar research and the broader
understanding of cosmic evolution.
Random Forest Classifier
The Random Forest Classifier is an ensemble learning method that builds multiple decision
trees during training and merges their outputs to improve prediction accuracy and control overfitting.
It is robust, handles large datasets with higher dimensionality well, and works efficiently for both
classification and regression tasks.
Algorithm:
Step 1: Data Sampling
Randomly select samples (with replacement) from the original training dataset to form
multiple subsets—this technique is known as bootstrapping.
Step 2: Tree Construction
For each subset, build an individual decision tree. At each node, a random subset of features
is selected to find the best split, ensuring diversity among the trees.
Step 3: Tree Growth
Each tree is grown to its maximum depth without pruning, capturing complex patterns from
its respective sample.
Step 4: Voting Mechanism
Once all trees are trained, predictions for a new input are made by aggregating the outputs
of all trees. For classification, the final class is determined by majority voting.
Step 5: Final Prediction
The model outputs the class with the highest number of votes from all the decision trees,
ensuring a more accurate and stable prediction than any individual tree.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 28

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Fig. 4.1. Random Forest Classifier

ADVANTAGES OF PROPOSED SYSTEM:


 Automation & Accuracy: The system automates the process of star classification, eliminating
manual errors and ensuring precise categorization using data-driven insights.
 Feature-based Classification: The machine learning models leverage diverse stellar attributes,
enabling a more comprehensive classification of stars based on well-defined astrophysical
characteristics.
 Scalability & Adaptability: The system is designed to handle large-scale astronomical datasets
and can be adapted for real-time classification as new stellar data becomes available.
 Efficient Decision-making: By employing machine learning algorithms, the system
accelerates the star classification process, which is crucial for astronomical research and space
exploration.
 Robust Handling of Data Variations: The preprocessing techniques mitigate inconsistencies
in astronomical datasets, ensuring the models generalize well across different star catalogues
and observational data sources.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 29

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

4.3 DATASET
Our project focuses on analysing the NASA Star Dataset from Kaggle, which contains
structured stellar characteristics essential for automated star classification. The dataset includes
multiple attributes that define the physical and spectral properties of stars, enabling machine
learning models to classify them accurately.
The dataset comprises stellar observations with key attributes such as temperature,
luminosity, radius, colour, spectral type, and absolute magnitude. These features help categorize
stars into distinct types, including Main Sequence, White Dwarfs, Giants, and Super giants. To
enhance classification accuracy, we apply multiple machines learning algorithms, comparing
existing methods such as Logistic Classifier, K-Nearest Neighbors (KNN), and Naïve Bayes with
our proposed Random Forest Classifier.
During the training phase, the dataset is utilized to identify patterns and relationships
between these stellar attributes, allowing models to predict star types effectively. After
classification, the dataset is enriched with predicted labels, indicating the assigned star type for
each instance. The implementation of the Random Forest algorithm improves classification
performance by leveraging multiple decision trees, enhancing accuracy and generalization.
By applying machine learning to star classification, our project streamlines the process,
reducing manual effort and increasing reliability. The ability to classify stars automatically aids
in advancing astronomical research and contributes to a better understanding of stellar evolution,
making the system valuable for future astronomical studies.

Fig 4.2. NASA Dataset

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 30

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

[Link] Features in Dataset


The dataset includes several astrophysical parameters that are critical for accurately
classifying stars into different types. The key features used for modelling include:
1. Temperature (Kelvin): Represents the surface temperature of the star, influencing its
spectral classification and colour.
2. Luminosity (L/L☉): Measures the total energy output of the star relative to the Sun,
distinguishing between different stellar types.
3. Radius (R/R☉): Indicates the star’s size compared to the Sun, playing a vital role in
classification.
4. Colour: Defines the visual appearance of the star, correlating with its temperature and
spectral type.
5. Spectral Type: Categorizes stars based on their spectral properties, such as O, B, A, F, G,
K, and M classes.
6. Absolute Magnitude: Represents the intrinsic brightness of the star, independent of its
distance from Earth.
7. Type of Star: The target variable, indicating the classification of stars into different groups
based on their characteristics.
4.4 FEASIBILITY STUDY
The feasibility of the project is analysed in this phase, ensuring that the proposed Automated
Star Type Classification Using Machine Learning system is efficient, cost-effective, and practical
for implementation. This study evaluates whether the system can be developed and deployed
without excessive resource consumption or computational burden. A thorough understanding of
the system’s core requirements is essential for feasibility analysis. The key considerations
involved in this study include:
 Economic Feasibility
 Technical Feasibility
 Operational Feasibility
4.4.1 ECONOMIC FEASIBILITY
The project is economically feasible as it leverages open-source machine learning
libraries such as Scikit-learn, NumPy, and Pandas, significantly reducing software costs. The

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 31

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

dataset used for training, NASA Star Dataset from Kaggle, is publicly available, eliminating
the need for expensive data acquisition. Since machine learning models such as Logistic
Classifier, K-Nearest Neighbors (KNN), Naïve Bayes, and Random Forest are
computationally efficient, the system does not require high-end computational resources for
training and classification. Additionally, cloud platforms such as Google Colab provide cost-
effective solutions for large-scale data processing, making the system highly economically
viable.
4.4.2 TECHNICAL FEASIBILITY
The project is technically feasible due to the availability of robust data processing
tools and machine learning frameworks. The NASA Star Dataset is processed using Python-
based libraries, including Pandas for data manipulation, Matplotlib and Seaborn for
visualization, and Scikit-learn for machine learning algorithms. The implementation of
Random Forest as the proposed classification model ensures improved accuracy compared to
existing models like Logistic Classifier, KNN, and Naïve Bayes. Furthermore, the abundance
of astronomical datasets and research papers enhances the accessibility of necessary resources
for developing and refining the classification system. The technical requirements align with
modern machine learning and data science standards, ensuring smooth implementation.
4.4.3 OPERATIONAL FEASIBILITY
The project is operationally feasible due to the availability of structured astronomical
datasets and the ease of implementing machine learning models. The essential skills required
for this project—Python programming, data preprocessing, feature engineering, and model
training—are well-supported by extensive online resources. The automated nature of the
classification process reduces human intervention, ensuring scalability and efficiency.
Additionally, the project follows a structured workflow, including data collection,
preprocessing, model training, evaluation, and deployment, making it adaptable for further
research and practical applications in astronomy and astrophysics.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 32

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-5
SYSTEM DESIGN

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 33

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

5. SYSTEM DESIGN

5.1 WORKFLOW OF THE SYSTEM

Fig. 5.1. Workflow of the system

This workflow outlines the structured approach for analysing NASA star data using
machine learning techniques. The process begins with Collecting NASA Star Data, which
involves acquiring datasets containing information on various star characteristics. Next, the
Preprocessing Data step ensures data consistency by handling missing values, scaling numerical
features, and encoding categorical variables. This is followed by Exploratory Data Analysis
(EDA), where statistical and visual techniques are employed to uncover trends, correlations, and
distributions within the dataset.
After gaining insights from EDA, the Train Model step involves selecting and training an
appropriate machine learning model to learn the patterns in the data. Once trained, the model's

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 34

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Performance is Evaluated using metrics such as accuracy, precision, recall, and F1-score to ensure
reliability. With a well-trained and evaluated model, it proceeds to Make Predictions on unseen
data, classifying new star observations based on learned features. Finally, the Interpret and Save
Results step ensures the model's outputs are documented, analysed, and stored for further scientific
research and applications.
5.2 ARCHITECTURAL DESIGN

Fig. 5.2. Architectural Design

Step 1: Data Collection - NASA Star Type Dataset


The process begins with gathering the NASA Star Type Dataset, which contains various
stellar attributes such as temperature, luminosity, radius, and spectral type. This dataset serves
as the foundation for training the classification model.
Step 2: Data Set Preparation
After data collection, preprocessing is performed to clean and organize the data. This
includes handling missing values, standardizing numerical attributes, encoding categorical
variables, and normalizing data for better model performance.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 35

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Step 3: Exploratory Data Analysis (EDA)


EDA techniques are applied to gain insights into the dataset. Statistical summaries,
correlation heatmaps, and visual plots help identify patterns, relationships, and distributions
among different star types.
Step 4: Train-Test Split
The dataset is split into training and testing sets to ensure proper model evaluation.
Typically, 80% of the data is used for training, while 20% is reserved for testing. This ensures
that the model is tested on unseen data to assess its generalizability.
Step 5: Preprocessing Test Data
Before feeding test data into the model, similar preprocessing steps (such as scaling and
encoding) are applied to ensure consistency with the training data.
Step 6: Model Training - Random Forest Classifier
The Random Forest Classifier, an ensemble learning algorithm, is selected for training.
It constructs multiple decision trees and aggregates their outputs to improve accuracy, handle
overfitting, and enhance generalization.
Step 7: Model Performance Evaluation
Once trained, the model is evaluated using performance metrics such as accuracy,
precision, recall, and F1-score. These metrics help determine the model's effectiveness in
classifying star types.
Step 8: Making Predictions - Output Star Type
After evaluation, the trained model is deployed to predict the star type of new or unseen
data. The predictions are compared against actual values to validate its reliability.
Step 9: Interpretation and Results Storage
The results of the classification process are interpreted and stored for further astronomical
research. These insights help scientists categorize stars efficiently and improve the
understanding of stellar properties.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 36

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

5.3 UML Diagrams


The Unified Modelling Language (UML) is a standardized and widely recognized modelling
language used in object-oriented software engineering. Managed by the Object Management Group
(OMG), UML provides a common framework for modelling various aspects of object-oriented
computer software. It consists of a Meta-model and notation, enabling the specification,
visualization, construction, and documentation of software system components. Beyond software
development, UML is also applied in business modelling and the representation of non-software
systems.
By incorporating best engineering practices, UML serves as a powerful tool for designing and
modelling large, complex systems. Its primarily graphical notations offer an intuitive way to
represent software designs, improving clarity and communication among developers, stakeholders,
and project teams. UML plays a crucial role in the software development lifecycle, contributing
significantly to the architecture, design, and implementation of object-oriented systems.
5.3.1 Class Diagram
A Class Diagram is a fundamental UML diagram that illustrates the static structure of a
software system. It depicts classes, their attributes, operations, and the relationships between
them. This diagram provides a visual representation of the system’s components and their
interconnections, offering developers a clear understanding of the system’s architecture and
design. By defining the classes and their properties, developers can efficiently plan and
implement the system’s functionality. A typical Class Diagram consists of multiple
interconnected classes, each containing attributes (data members) and operations (methods),
which establish relationships among different components within the system.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 37

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Fig. 5.3. Class Diagram

5.3.2 Activity Diagram


It outlines the structured workflow for building and evaluating a machine learning model.
The process begins with the uploading of the dataset, ensuring that the required data is available
for analysis. Following this, Exploratory Data Analysis (EDA) is performed to uncover insights,
detect patterns, and identify anomalies in the dataset.
After EDA, the data preprocessing step is carried out, which includes handling missing
values, normalizing features, and encoding categorical data to prepare it for model training. The
training phase follows, where various machine learning models are trained on the processed
dataset.
At this stage, a decision point determines whether a pre-trained model exists. If a trained
model is available, it is loaded and tested to assess its performance. Otherwise, a new model is
trained, and the resulting model is saved for future use. Simultaneously, the trained models
undergo evaluation, where their performance is assessed using metrics such as accuracy,
precision, recall, and F1-score. The results are then compared to determine the best-performing
model.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 38

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Once the model is finalized, it proceeds to make predictions on new or unseen data. The
results of these predictions are then saved and exported, ensuring they are available for further
analysis or deployment. The workflow concludes with the end state, marking the completion of
the machine learning pipeline.

Fig. 5.4. Activity Diagram

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 39

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

5.3.3 Sequence Diagram


A sequence diagram, a type of Unified Modelling Language (UML) interaction diagram,
is an essential tool for depicting the flow of interactions between system components or objects
over time. It represents the dynamic behaviour of a system by illustrating the sequence of
message exchanges among different elements. By modelling various scenarios and use cases,
sequence diagrams help developers analyse system behaviour, identify potential issues, and
optimize performance.
Additionally, they ensure alignment with stakeholder requirements by providing a clear
visualization of system operations. Beyond its technical significance, sequence diagrams
facilitate effective communication and collaboration among developers and stakeholders,
serving as a shared visual framework for discussing and refining system designs.

Fig. 5.5. Sequence Diagram

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 40

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

5.3.4 Use case Diagram


A Use Case diagram, an essential element of Unified Modelling Language (UML),
visually represents the interactions between users and the system. Its primary purpose is to
provide a high-level overview, highlighting the various actors, including both users and external
systems, and the specific use cases or scenarios in which they interact with the system. This
diagram is crucial for understanding system requirements and the complex relationships between
users and the system, ensuring clarity in functionality and design.

Fig. 5.6. Use Case Diagram

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 41

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-6
TESTING

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 42

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

6. TESTING
TESTING
Testing is a systematic process crucial for evaluating the functionality and reliability of the
system to ensure it aligns with specified requirements. It involves executing different components
under controlled conditions to identify defects and maintain quality standards. The testing
process for our project is categorized into three main types: Unit Testing, Integration Testing,
and System Testing.
Unit Testing
Unit testing ensures that individual modules or functions in our system perform correctly
in isolation. Each function is tested independently to verify expected outputs and detect early-
stage bugs. For our project, unit tests focus on ensuring correct validation of user inputs, such as
login and signup, testing API endpoints for expected responses, and verifying database
interactions like CRUD operations on stored records. By catching issues early, unit testing
enhances code maintainability and software reliability.
Integration Testing
Integration testing verifies the interaction between different components of the system. It
ensures smooth communication between various modules and services. For our project,
integration testing ensures seamless interaction between the frontend (React) and backend
(Django or [Link]), proper database interactions through API requests, and the smooth
functioning of third-party integrations like email reminders and payment gateways. This type of
testing helps identify inconsistencies or misconfigurations between interconnected modules.
System Testing
System testing evaluates the entire project holistically to ensure it meets all functional and
non-functional requirements. It validates the overall system performance and readiness for
deployment. System testing includes Functional Testing, which checks the correctness of core
features like user authentication, data storage, and retrieval. It also includes Performance Testing,
which measures response times and system behaviour under different loads, and Usability
Testing, which ensures that the interface is user-friendly and accessible.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 43

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-7
RESULTS AND
SCREENSHOTS

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 44

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

7. RESULT AND SCREENSHOTS

7.1 EVALUATION METRICS


Evaluation metrics are essential tools used to assess the performance and reliability of our
machine learning models. These metrics provide quantitative measures that help in evaluating the
effectiveness of the model, guiding improvements, and ensuring optimal performance. The choice of
evaluation metrics depends on the nature of the problem being addressed and the desired outcome.
By utilizing multiple evaluation metrics, we can gain comprehensive insights into model
performance, allowing for better decision-making regarding model selection, optimization, and
deployment. These metrics play a crucial role not only in validating the effectiveness of our model
but also in comparing different algorithms to determine the most suitable approach for our project.
Accuracy
Accuracy is a metric used to measure the proportion of correctly predicted values out of the total
number of predictions. It is calculated by dividing the number of correct predictions by the total
number of predictions. The formula for accuracy is:

Where:
 Number of Correct Predictions refers to instances where the model correctly classifies the
given data.
 Total Number of Predictions is the sum of all instances tested by the model.
Precision
Precision is a metric used to measure the proportion of correctly predicted positive cases out of all
predicted positive cases. It helps in evaluating how many of the predicted positive instances are
actually relevant. The formula for precision is:

Where:
 True Positives (TP) are cases where the model correctly predicts a positive outcome.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 45

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

 False Positives (FP) are cases where the model incorrectly predicts a positive outcome.
Recall
Recall, also known as Sensitivity, measures the proportion of actual positive cases that were correctly
identified by the model. It is useful in scenarios where missing a positive instance is critical. The
formula for recall is:

Where:
 True Positives (TP) are correctly predicted positive cases.
 False Negatives (FN) are actual positive cases that the model incorrectly classified as negative.
F1 Score
F1 Score is a harmonic mean of precision and recall, providing a balanced evaluation when the
dataset is imbalanced. It is calculated as:

Where:
 Precision measures the relevance of positive predictions.
 Recall measures the completeness of positive predictions.
Confusion Matrix
A confusion matrix is a table used to evaluate the performance of a classification model by showing
the distribution of predictions across different classes. It consists of four components:

Predicted Positive Predicted Negative


Actual Positive True Positive (TP) False Negative (FN)
Actual Negative False Positive (FP) True Negative (TN)

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 46

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Where:
 True Positives (TP): Correctly classified positive instances.
 False Positives (FP): Incorrectly classified negative instances as positive.
 True Negatives (TN): Correctly classified negative instances.
 False Negatives (FN): Incorrectly classified positive instances as negative.
Classification Report
A classification report provides a summary of different evaluation metrics such as precision, recall,
F1 score, and support for each class. It gives a comprehensive overview of model performance across
all categories.
The classification report includes:
 Precision for each class
 Recall for each class
 F1 Score for each class
 Support (number of instances for each class)

7.2 RESULT COMPARISON


Table 7.1. presents the performance comparison of different machine learning models for
automated star classification using NASA’s dataset reveals that the Random Forest model is the most
effective, achieving a perfect accuracy of 100% along with 100% precision, recall, and F1 score,
indicating flawless classification across all star types. Logistic Classifier follows closely with 97.92%
accuracy, demonstrating strong predictive capability with balanced precision and recall. The Naive
Bayes model, with an accuracy of 95.83%, performs well but exhibits minor misclassifications,
particularly in distinguishing similar spectral classes. The K-Nearest Neighbors (KNN) model has
the lowest accuracy of 93.75%, suggesting that it struggles with complex feature distributions due to
its distance-based classification approach. While all models show high recall values, confirming their
ability to detect various star types effectively, the Random Forest model's superior performance
establishes it as the most reliable model for accurate and automated star classification using machine
learning.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 47

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Table 7.1. Performance Comparison of Various Algorithms

Model Accuracy (%) Precision (%) Recall (%) F1 Score (%)


Logistic Classifier 97.50 97.30 97.30 97.30
Naive Bayes 98.75 98.75 98.72 98.68
K-Nearest Neighbors 96.25 96.25 96.40 96.24
Random Forest 100.00 100.00 100.00 100.00

Table 7.2. presents that the Logistic Classifier model performed exceptionally well with an
overall accuracy of 98%, showing perfect precision, recall, and F1-score for Brown Dwarfs, Main
Sequence stars, Super Giants, and Hyper Giants. However, minor misclassifications occurred with
Red Dwarfs (precision: 0.88) and White Dwarfs (recall: 0.88), which slightly reduced the model's
overall performance. The high recall value for Red Dwarfs (1.00) indicates that the model correctly
identified all Red Dwarfs but had a few false positives in classifying other star types as Red Dwarfs.
Despite this, the model demonstrates strong classification performance across all categories, making
it a reliable method for stellar classification.

Table 7.2. Logistic Classifier Classification Report

Star Type Precision Recall F1-Score Support

Red Dwarf 0.97 0.97 0.97 32

Brown Dwarf 1.00 1.00 1.00 53

White Dwarf 0.95 0.92 0.94 39

Main Sequence 0.98 1.00 0.99 41

Super Giants 0.95 0.95 0.95 37

Hyper Giants 1.00 1.00 1.00 38

Overall Accuracy 0.97 0.97 0.97 240

Table 7.3. presents that the Naive Bayes model achieved an overall accuracy of 96%, slightly
lower than Logistic Classifier. The model perfectly classified Brown Dwarfs and Hyper Giants
(precision & recall = 1.00), showing its effectiveness in differentiating these star types. However,

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 48

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Red Dwarfs had a recall of only 0.86, meaning some Red Dwarfs were incorrectly classified as other
star types. Additionally, Main Sequence and Super Giants had lower precision (0.89), which suggests
that the model sometimes misclassified other stars as these types. Although the performance is strong,
the slightly lower precision and recall values for Red Dwarfs, Main Sequence, and Super Giants
indicate that Naive Bayes may struggle with feature overlap among similar stellar categories.

Table 7.3. Naïve Bayes Classifier Classification Report

Star Type Precision Recall F1-Score Support

Red Dwarf 1.00 1.00 1.00 32

Brown Dwarf 1.00 1.00 1.00 53

White Dwarf 1.00 0.92 0.96 39

Main Sequence 1.00 1.00 1.00 41

Super Giants 0.93 1.00 0.96 37

Hyper Giants 1.00 1.00 1.00 38

Overall Accuracy 0.99 0.99 0.99 240

Table [Link] that K-Nearest Neighbors (KNN) model performed slightly lower than
Logistic Classifier and Naive Bayes, achieving an accuracy of 94%. The model performed well in
predicting Brown Dwarfs and Hyper Giants (precision & recall = 1.00), but Super Giants and White
Dwarfs had lower recall values (0.88), indicating misclassification of some samples. The lower recall
for Brown Dwarfs (0.91) suggests that some Brown Dwarfs were incorrectly classified into other
categories. Despite these limitations, KNN still demonstrates a high overall classification
performance, though it struggles slightly when dealing with overlapping feature distributions in the
dataset.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 49

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Table 7.4. K-Nearest Neighbor Classifier Classification Report

Star Type Precision Recall F1-Score Support

Red Dwarf 0.97 1.00 0.98 32

Brown Dwarf 1.00 0.94 0.97 53

White Dwarf 0.86 0.95 0.90 39

Main Sequence 1.00 1.00 1.00 41

Super Giants 0.97 0.89 0.93 37

Hyper Giants 0.97 1.00 0.99 38

Overall Accuracy 0.96 0.96 0.96 240

Table 7.5. presents that the Random Forest model delivered a perfect performance across all
metrics, achieving 100% accuracy, precision, recall, and F1-score for every star type. Unlike the
other models, Random Forest did not misclassify any star, making it the most reliable and effective
model for stellar classification. The perfect classification indicates that the model successfully
captures intricate patterns within the dataset and differentiates between Red Dwarfs, Brown Dwarfs,
White Dwarfs, Main Sequence, Super Giants, and Hyper Giants with absolute certainty. This
outstanding performance solidifies Random Forest as the best choice for automated star classification
using machine learning.

Table 7.5. Random Forest Classifier Classification Report

Star Type Precision Recall F1-Score Support

Red Dwarf 1.00 1.00 1.00 32

Brown Dwarf 1.00 1.00 1.00 53

White Dwarf 1.00 1.00 1.00 39

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 50

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Main Sequence 1.00 1.00 1.00 41

Super Giants 1.00 1.00 1.00 37

Hyper Giants 1.00 1.00 1.00 38

Overall Accuracy 1.00 1.00 1.00 240

Figure 7.1 presents the confusion matrices for four different machine learning models—
Logistic Classifier, Naïve Bayes, K-Nearest Neighbors (KNN), and Random Forest—to analyse their
classification performance in identifying star types. Each confusion matrix visually represents the
true class labels on the y-axis and the predicted class labels on the x-axis, showing the model’s ability
to correctly classify each star type while also highlighting misclassifications. The Logistic Classifier
model (Fig. 7.1a) performs well, but it misclassifies one White Dwarf as a Red Dwarf and one Red
Dwarf as a White Dwarf, indicating a slight overlap between these categories. Similarly, Naïve Bayes
(Fig. 7.1b) exhibits a similar trend, with one Red Dwarf misclassified as a White Dwarf and one
White Dwarf misclassified as a Main Sequence star. These errors suggest that both Logistic Classifier
and Naïve Bayes may struggle with distinguishing overlapping features in some star classes.
The K-Nearest Neighbors (Fig. 7.1c) model shows slightly more misclassification errors
compared to the previous two models, misclassifying a Brown Dwarf as a White Dwarf and a Red
Dwarf as a White Dwarf. Additionally, one Super Giant was misclassified as a Main Sequence star,
further reducing its reliability. In contrast, the Random Forest model (Fig. 7.1d) achieves perfect
classification, correctly predicting all instances without any misclassification errors. This indicates
that Random Forest effectively learns complex relationships in the dataset and provides the best
classification performance. The perfect diagonal alignment in the confusion matrix of Random Forest
confirms its 100% accuracy, making it the most suitable model for stellar classification tasks.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 51

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

(a) (b)

(c) (d)
Fig 7.1. Confusion Matrices. (a) Logistic Classifier. (b) Naïve Bayes.
(c) K-Nearest Neighbor. (d) Proposed Random Forest.

Table 7.6. presents the True Positives (TP), True Negatives (TN), False Positives (FP), and
False Negatives (FN) for different machine learning models used in star classification. Logistic
Classifier achieved 47 TP and 192 TN, with only 1 FP and 1 FN, indicating a highly reliable
classification with minimal errors. Naïve Bayes performed slightly worse, with 46 TP, 191 TN, 2 FP,
and 1 FN, suggesting a marginal increase in misclassification. K-Nearest Neighbors (KNN) exhibited

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 52

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

the highest error rate among the models, with 44 TP, 189 TN, 4 FP, and 2 FN, highlighting its
struggles in distinguishing between certain star types. In contrast, the Random Forest model achieved
perfect classification, with 48 TP, 192 TN, 0 FP, and 0 FN, demonstrating its superior learning
capability and robustness in identifying stellar types. This analysis confirms Random Forest as the
most effective model for star classification, followed by Logistic Classifier and Naïve Bayes, with
KNN being the least reliable due to its higher misclassification rate.

Table 7.6. Analysis of Confusion Matrices

Model TP TN FP FN

Logistic Classifier 41 191 2 1

Naïve Bayes 41 191 2 1

K-Nearest Neighbors 41 189 4 2

Random Forest 41 192 0 0

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 53

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

7.3 SCREENSHOTS

Fig 7.2. UI of Research Work

Fig 7.3. Dataset Uploading

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 54

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Fig 7.4. Dataset Uploaded

Fig 7.5. Train Test Splitting

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 55

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Fig 7.6. Existing LC Performance Analysis

Fig 7.7. Existing NBC Performance Analysis

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 56

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Fig 7.8. Existing KNN Performance Analysis

Fig 7.9. Proposed RFC Performance Analysis

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 57

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Fig 7.10. Performance Evaluation Summary

Fig 7.11. Test Data Results of RFC

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 58

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-8
CONCLUSION

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 59

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

8. CONCLUSION
This Star Type Classification System leverages the power of the Random Forest algorithm to
automate the categorization of stars, outperforming traditional models such as Logistic Classifier,
Naïve Bayes, and K-Nearest Neighbors (KNN). Unlike these models, Random Forest efficiently
handles complex, non-linear relationships in astronomical data, reducing overfitting and improving
overall classification accuracy. By processing vast datasets with precision, it enhances not only star
classification but also contributes to exoplanet detection, stellar evolution studies, and broader
cosmic research. The integration of machine learning in this domain minimizes human errors,
optimizes computational efficiency, and enables large-scale analysis, paving the way for future
advancements in automated celestial studies. This project underscores the transformative potential
of AI in astronomy, offering a scalable and robust solution for astronomical data analysis.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 60

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-9
FUTURE SCOPE

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 61

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

9. FUTURE SCOPE
The project can be significantly improved by integrating deep learning techniques such as
Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) to enhance
classification accuracy and model robustness. Expanding the dataset by incorporating high-precision
astronomical surveys like Gaia and the Sloan Digital Sky Survey (SDSS) will provide richer and
more diverse data, leading to better generalization of the model. Additionally, the system can be
extended to support exoplanet detection by analysing stellar light curves and transit events, aiding in
the discovery of habitable planets beyond our solar system. Implementing automated anomaly
detection will allow the identification of rare celestial objects and unknown star types, contributing
to new astronomical discoveries. Collaboration with space agencies such as NASA and ESA can
further enhance the project by leveraging high-resolution datasets and computational resources for
large-scale star mapping, deep-space research, and real-time astronomical event monitoring. This
integration will not only refine the accuracy and efficiency of star classification but also open new
frontiers in astrophysics and space exploration.

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 62

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

CHAPTER-10
BIBLIOGRAPHY

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 63

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

[Link]
[1] Zeraatgari, Fatemeh Zahra, Fatemeh Hafezianzadeh, Yanxia Zhang, Liquan Mei, Ashraf
Ayubinia, Amin Mosallanezhad, and Jingyi Zhang. "Machine learning-based photometric
classification of galaxies, quasars, emission-line galaxies, and stars." Monthly Notices of the
Royal Astronomical Society 527, no. 3 (2024): 4677-4689.

[2] Cody, S. E., Scher, S., McDonald, I., Zijlstra, A., Alexander, E., & Cox, N. L. J. (2024).
Machine learning based stellar classification with highly sparse photometry data. arXiv.
[Link]

[3] Savyanavar, Amit Sadanand, Nikhil Mhala, and Shiv H. Sutar. "Star Galaxy
Classification Using Machine Learning Algorithms and Deep Learning." International
Journal on Information Technologies & Security 15, no. 2 (2023)..

[4] Tamez Villarreal, J., & Barton, S. (2023). Stellar Classification based on Various Star
Characteristics using Machine Learning Algorithms. In Journal of Student Research (Vol.
12, Issue 1). [Link]

[5] Haghighi, M. H. Z. (2023). Analyzing Astronomical Data with Machine Learning


Techniques (Version 1). arXiv. [Link]

[6] Qi, Z. (2022). Stellar Classification by Machine Learning. In A. Luqman, Q. Zhang, &
W. Liu (Eds.), SHS Web of Conferences (Vol. 144, p. 03006). EDP Sciences.
[Link]
[7] Zhao, Z., Wei, J., & Jiang, B. (2022). Automated Stellar Spectra Classification with
Ensemble Convolutional Neural Network. In K. Yakut (Ed.), Advances in Astronomy
(Vol. 2022, pp. 1–7). Hindawi Limited. [Link]
[8] Dafonte, C., Rodríguez, A., Manteiga, M., Gómez, Á., & Arcay, B. (2020). A Blended
Artificial Intelligence Approach for Spectral Classification of Stars in Massive
Astronomical Surveys. In Entropy (Vol. 22, Issue 5, p. 518). MDPI AG.
[Link]
[9] Kyritsis, E., Maravelias, G., Zezas, A., Bonfini, P., Kovlakas, K., & Reig, P. (2022). A
new automated tool for the spectral classification of OB stars. In Astronomy &

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 64

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

Astrophysics (Vol. 657, p. A62). EDP Sciences. [Link]


6361/202040224
[10] Kuntzer, T., Tewes, M., & Courbin, F. (2016). Stellar classification from single-band
imaging using machine learning. In Astronomy & Astrophysics (Vol. 591, p. A54).
EDP Sciences. [Link]
[11] Cody, Seán Enis, Sebastian Scher, Iain McDonald, Albert Zijlstra, Emma Alexander, and
Nick Cox. "Machine learning based stellar classification with highly sparse photometry
data." Open Research Europe 4, no. 29 (2024): 29.
[12] Huichaqueo, M. O., & Orrego, R. M. (2022). Automatic Spectral Classification of Stars
using Machine Learning: An Approach based on the use of Unbalanced Data. In Machine
Learning and Applications: An International Journal (Vol. 9, Issue 4, pp. 01–16).
Academy and Industry Research Collaboration Center (AIRCC).
[Link]
[13] Tamez Villarreal, J., & Barton, S. (2023). Stellar Classification based on Various Star
Characteristics using Machine Learning Algorithms. In Journal of Student Research (Vol.
12, Issue 1).[Link]
[14] Qi, Z. (2022). Stellar Classification by Machine Learning. In A. Luqman, Q. Zhang, &
W. Liu (Eds.), SHS Web of Conferences (Vol. 144, p. 03006). EDP Sciences.
[Link]
[15] Huichaqueo, Marco Oyarzo, and Renato Muñoz Orrego. "AUTOMATIC SPECTRAL
CLASSIFICATION OF STARS USING MACHINE LEARNING: AN APPROACH
BASED."
[16] Zhang, J., Lian, J., Yi, Z., Yang, S., & Shan, Y. (2021). High-Accuracy Guide Star Catalogue
Generation with a Machine Learning Classification Algorithm. In Sensors (Vol. 21, Issue 8, p.
2647). MDPI AG. [Link]
[17] Kadam, S. S., Chaudhari, K. S., Chaudhari, J. V., Mahajan, T. N., & Kosamkar, P. (2024). Star
Galaxy Classification Using Deep Learning. In 2024 International Conference on Advancements
in Smart, Secure and Intelligent Computing (ASSIC) (pp. 1–5). 2024 International Conference on
Advancements in Smart, Secure and Intelligent Computing (ASSIC). IEEE.
[Link]
[18] Hosenie, Z., Lyon, R., Stappers, B., Mootoovaloo, A., & McBride, V. (2020). Imbalance learning

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 65

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh


AUTOMATED STAR TYPE CLASSIFICATION WITH MACHINE LEARNING USING NASA DATA

for variable star classification. In Monthly Notices of the Royal Astronomical Society (Vol. 493,
Issue 4, pp. 6050–6059). Oxford University Press (OUP). [Link]
[19] Hinners, T. A., Tat, K., & Thorp, R. (2018). Machine Learning Techniques for Stellar Light Curve
Classification. In The Astronomical Journal (Vol. 156, Issue 1, p. 7). American Astronomical
Society. [Link]
[20] Hoffman, D. I., Harrison, T. E., & McNamara, B. J. (2009). AUTOMATED VARIABLE STAR
CLASSIFICATION USING THE NORTHERN SKY VARIABILITY SURVEY. In The
Astronomical Journal (Vol. 138, Issue 2, pp. 466–477). American Astronomical Society.
[Link]

GEETHANJALI INSITUTE OF SCIENCE AND TECHNOLOGY P a g e | 66

Gangavaram (V), Kovur (M), SPSR Nellore (Dt), Andhra Pradesh

You might also like