Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Feb 16, 2022
1 parent 2fdd486 commit 0da30fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notebooks/explore.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@
"- k-nearest neighbors\n",
"- bond energy minimization (via Metropolis algorithm)\n",
"\n",
"These strategies can also be used to generate entirely novel grids. They follow the `numpy` and `scipy` conventions in exposing two primary methods, `fit()` and `predict()`. Each model\n",
"These strategies can also be used to generate entirely novel grids. They follow the `numpy` and `scipy` conventions in exposing two primary methods, `fit()` and `predict()`.\n",
"\n",
"### Random neighbor selection\n",
"\n",
Expand Down Expand Up @@ -1325,7 +1325,7 @@
"source": [
"### K-nearest neighbors\n",
"\n",
"The k-nearest neighbors model attempts to find cell neighborhoods similar to the location to be predicted, ranks them according to similarity, and selects the most common central cell value from a subset of the most similar neighborhoods (ties are broken randomly)."
"The k-nearest neighbors model attempts to predict cell values based on neighborhoods similar to the location to be predicted. Neighborhood similarity is evaluated by mapping each neighborhood to a fixed-length string, in which each neighboring location corresponds to a particular character, and computing the Hamming distance between strings. The algorithm then ranks neighborhoods according to similarity to the neighborhood of the cell to be predicted, retaining a small subset of the most similar neighborhoods, then selects the most common central cell value from the subset (ties are broken randomly)."
],
"metadata": {
"collapsed": false
Expand Down Expand Up @@ -1483,7 +1483,7 @@
{
"cell_type": "markdown",
"source": [
"KNN can also be used to generate entirely novel grids, but this is subject to the same limitation faced by RNS: when a cell has no known neighbors, the cell value is randomly selected according to the known class distribution (preserving no spatial from the training set)."
"KNN can also be used to generate entirely novel grids, but this is subject to the same limitation faced by RNS: when a cell has no known neighbors, the cell value is randomly selected according to the known class distribution (preserving no spatial information from the training set)."
],
"metadata": {
"collapsed": false
Expand Down

0 comments on commit 0da30fe

Please sign in to comment.