Skip to content

kerimcanbalkan/Ppdot-ML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulsar Type Classification using Random Forest

Overview

This project aims to classify pulsars into different types based on their characteristic features, specifically the Pulse period (P0), Period derivative (P1), and Surface Magnetic Field (BSURF). The classification is performed using the Random Forest algorithm, a machine learning technique.

Dataset

The dataset used in this project is obtained from the ATNF Pulsar Catalogue, containing information about pulsars' P0, P1, TYPE, and BSURF parameters.

Classes

AXP: Anomalous X-ray Pulsar or Soft Gamma-ray Repeater with detected pulsations

HE: Spin-powered pulsar with pulsed emission from radio to infrared or higher frequencies

NRAD: Spin-powered pulsar with pulsed emission only at infrared or higher frequencies

RRAT: Pulsars with intermittently pulsed radio emission

XINS: Isolated neutron stars with pulsed thermal X-ray emission but no detectable radio emission

Requirements

  • Python 3.x
  • pandas
  • numpy
  • matplotlib
  • scikit-learn

Usage

  1. Install the required dependencies using: pip install pandas numpy matplotlib scikit-learn
  2. Run the project file: python main.py
  3. The Random Forest classifier will be trained on the data, and predictions will be made on a test set.
  4. Accuracy and additional classification metrics will be displayed.
  5. Three plots will be generated and saved:
    • Original Data
    • Test Data
    • Predicted Data

Results

The Random Forest classifier achieves an accuracy of approximately 78%, indicating its effectiveness in classifying pulsar types based on the provided features.

Classification Metrics

Accuracy: 0.78

Type Precision Recall F1-Score Support
AXP 0.88 1.00 0.93 7
HE 0.84 0.82 0.83 68
NRAD 0.56 0.48 0.51 21
RRAT 0.79 1.00 0.88 11
XINS 0.50 0.50 0.50 2

Plots

Original Data Test Data Predicted Data

File Descriptions

  • main.py: Main script containing the implementation of the Random Forest classifier.
  • data/data1.csv: CSV file containing the ATNF Pulsar Catalogue data.
  • README.md: This file providing an overview of the project.

Acknowledgments

ATNF Pulsar Catalogue: Link to ATNF Pulsar Catalogue

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages