* Applies the model to the manually entered hand value and updates the UI with * the model's prediction.
()
| 196 | * the model's prediction. |
| 197 | */ |
| 198 | function predictHandler() { |
| 199 | const cards = ui.getInputCards(); |
| 200 | const features = |
| 201 | gameToFeaturesAndLabel({player1Hand: cards, player1Win: 1}).xs; |
| 202 | const output = GLOBAL_MODEL.predict(features.expandDims(0)); |
| 203 | ui.displayPrediction(`${output.dataSync()[0].toFixed(3)}`); |
| 204 | } |
| 205 | |
| 206 | /** |
| 207 | * Updates the game constant controlling the number of cards per hand and |
no test coverage detected