Skip to content

Commit 66e6842

Browse files
committed
Update README.md
1 parent d608c80 commit 66e6842

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Grid search results are already provided in `grid` folder, but if you want to tu
4747
```
4848
python grid_search.py
4949
```
50-
This may take several hours to complete execution, once it is finished, results are stored in `grid` folder.
50+
This may take several hours to complete execution, once it is finished, best estimators are stored and pickled in `grid` folder.
5151

5252
## Example 1: Using 3 Emotions
5353
The way to build and train a model for classifying 3 emotions is as shown below:
@@ -72,19 +72,20 @@ Test score: 0.8148148148148148
7272
Train score: 1.0
7373
```
7474
### Determining the best model
75-
In order to determine the best model, you can so by retrieving the results of the GridSearchCV ( that is stored in `grid` folder ):
75+
In order to determine the best model, you can by:
7676

7777
```python
78-
# loads the best estimators that was retrieved from GridSearchCV,
78+
# loads the best estimators from `grid` folder that was searched by GridSearchCV in `grid_search.py`,
7979
# and set the model to the best in terms of test score, and then train it
8080
rec.determine_best_model(train=True)
8181
# get the determined sklearn model name
82-
print(rec.model.__class__.__name__)
82+
print(rec.model.__class__.__name__, "is the best")
83+
# get the test accuracy score for the best estimator
8384
print("Test score:", rec.test_score())
8485
```
8586
**Output:**
8687
```
87-
MLPClassifier
88+
MLPClassifier is the best
8889
Test Score: 0.8958333333333334
8990
```
9091
### Predicting

0 commit comments

Comments
 (0)