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 |
```
|