This project involves the classification of stars based on their physical characteristics. The dataset includes features such as the star's temperature, luminosity, radius, absolute magnitude, color, and spectral class.
The script 'star_classification.py' performs the following steps:
- Loads the dataset.
- Preprocesses the data, including standardizing the star color names and encoding the categorical variables.
- Splits the dataset into a training set and a test set.
- Trains several different models, including logistic regression, a decision tree, a random forest, and gradient boosting.
- Evaluates the performance of each model on the test set using the accuracy metric.
To run the script, you will need Python along with the pandas, sklearn, matplotlib, and seaborn libraries.
After downloading the script, you can run it with a command like 'python star_classification.py' in the terminal.
The results, including the accuracy of each model on the test set, are printed to the console.