Tabular Regression
Scikit-learn
Joblib
Voting_regressor
materials property prediction
baseline-trainer
Instructions to use IMFAA/Magnet_Tc_predictor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use IMFAA/Magnet_Tc_predictor with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("IMFAA/Magnet_Tc_predictor", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -112,16 +112,17 @@ The voting regressor to predict the Tc combines the following four base models a
|
|
| 112 |
|
| 113 |
```python
|
| 114 |
import json
|
| 115 |
-
|
| 116 |
import pandas as pd
|
| 117 |
|
| 118 |
Tc_predictor = load('Magnet_Tc_predictor.joblib') # trained model
|
|
|
|
|
|
|
| 119 |
|
| 120 |
#data = pd.read_excel("data.xlsx") # read test file with new compositions
|
| 121 |
-
data = data[features]
|
| 122 |
-
test_composition = array[:]
|
| 123 |
|
| 124 |
-
Predicted_value = Tc_predictor.predict(
|
| 125 |
print("Predicted Tc value is: {0:.2f}'.format(predictions)")
|
| 126 |
|
| 127 |
```
|
|
|
|
| 112 |
|
| 113 |
```python
|
| 114 |
import json
|
| 115 |
+
import joblib
|
| 116 |
import pandas as pd
|
| 117 |
|
| 118 |
Tc_predictor = load('Magnet_Tc_predictor.joblib') # trained model
|
| 119 |
+
config = json.load(open('config.json'))
|
| 120 |
+
features = config['features'] # feature vector
|
| 121 |
|
| 122 |
#data = pd.read_excel("data.xlsx") # read test file with new compositions
|
| 123 |
+
data = data[features]
|
|
|
|
| 124 |
|
| 125 |
+
Predicted_value = Tc_predictor.predict(data) # predict Tc values
|
| 126 |
print("Predicted Tc value is: {0:.2f}'.format(predictions)")
|
| 127 |
|
| 128 |
```
|