Skip to content

Commit 97eab6c

Browse files
committed
Fix math and dropped
1 parent a3ce499 commit 97eab6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

introduction_to_amazon_algorithms/blazingtext_word2vec_subwords_text8/blazingtext_word2vec_subwords_text8.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@
424424
"outputs": [],
425425
"source": [
426426
"import numpy as np\n",
427+
"import math\n",
427428
"from scipy import stats\n",
428429
"\n",
429430
"batch_size = 500\n",
@@ -485,7 +486,7 @@
485486
"fin.close()\n",
486487
"\n",
487488
"corr = stats.spearmanr(mysim, gold)\n",
488-
"print(\"Correlation: %s, Dropped words: %s%%\" % (corr[0] * 100, math.ceil(drop / nwords * 100.0)))\n"
489+
"print(\"Correlation: %s, Dropped words: %s%%\" % (corr[0] * 100, math.ceil(dropped / nwords * 100.0)))\n"
489490
]
490491
},
491492
{

0 commit comments

Comments
 (0)