This repository focuses on predicting the bulk modulus of inorganic crystals using a variety of machine learning techniques. The project leverages a dataset sourced from Matminer, enhanced with the Magpie feature generator, and explores several regression and feature selection methods to identify the optimal predictive model.
The goal of this project is to accurately predict the bulk modulus (a measure of material stiffness) of inorganic crystals. This is achieved by applying and comparing various machine learning models and feature selection techniques on a comprehensive dataset of material properties.
- Source: Matminer
- Feature Generation: Magpie
- Files:
features-bulknew.csv: Contains the generated features for each material.target-bulknew.csv: Contains the target bulk modulus values.
- Principal Component Analysis (PCA) for dimensionality reduction
- Linear regression models: Least Squares, Ridge, Lasso
- Polynomial feature expansion
- Decision Tree Regressor
- Kernel Ridge Regression
- Feature selection: LARS, Recursive Feature Elimination (RFE)
- Model evaluation using standard performance metrics
The following steps are implemented in the project:
- Data Preprocessing: Loading, cleaning, and normalizing the dataset.
- Feature Engineering: Applying PCA and polynomial expansion.
- Model Training: Training various regression models.
- Feature Selection: Using LARS and RFE to select the most relevant features.
- Model Evaluation: Comparing models using metrics such as RMSE, MAE, and R².
-
Clone the repository:
git clone https://github.com/Sumanthreddy-DE/Predicting-the-Bulk-Modulus-of-Inorganic-Crystals.git cd Predicting-the-Bulk-Modulus-of-Inorganic-Crystals -
Install dependencies:
- Recommended: Use a virtual environment.
- Install required packages (see Requirements).
-
Run the analysis:
- For PCA analysis:
python pca.py
- For model training and evaluation:
python task2.py python task3.py
- For plotting PCA spectrum:
python pca_plot_spectrum.py
- For PCA analysis:
-
Jupyter Notebook:
- Open
PCA.ipynbfor an interactive exploration.
- Open
The project compares multiple regression models and feature selection techniques to determine the best approach for predicting the bulk modulus. Results and plots are generated and saved during script execution. For detailed results, refer to the output files and notebook.
.
├── Exercise-Instructions.pdf
├── features-bulknew.csv
├── target-bulknew.csv
├── get_data.py
├── pca.py
├── pca_plot_spectrum.py
├── PCA.ipynb
├── task2.py
├── task3.py
├── Task3-finished
└── README.md
- Python 3.7+
- numpy
- pandas
- scikit-learn
- matplotlib
- (Optional) jupyter
Install all dependencies using:
pip install -r requirements.txtor install individually as needed.
- Matminer: Open-source toolkit for materials data mining
- Magpie: Materials-Agnostic Platform for Informatics and Exploration
- scikit-learn documentation
This project is for educational and research purposes. See LICENSE if provided.
Feel free to modify this README to better fit your specific workflow or to add more details about your results and findings!