Skip to content

Fixed exceptions from Annoy and nearest_neighbors#20

Open
WilliamGustafson wants to merge 1 commit into
x-tabdeveloping:mainfrom
WilliamGustafson:package-fixes
Open

Fixed exceptions from Annoy and nearest_neighbors#20
WilliamGustafson wants to merge 1 commit into
x-tabdeveloping:mainfrom
WilliamGustafson:package-fixes

Conversation

@WilliamGustafson
Copy link
Copy Markdown

Fixes for Issues #19 and #18.

  • In Process.query and Process.index self.nearest_neighbors does not expect a sparse matrix, now the vectors are converted to a dense numpy matrix
  • The metric name 'cosine' is not used in Annoy, so the default metric in char_ngram_process was changed to 'angular' (the closest analogue)
    • sklearn's pairwise_distances function doesn't have an 'angular' metric so 'cosine' is used in process.ratio in place of 'angular'

* In Process.query and Process.index self.nearest_neighbors does not expect a sparse matrix, now the vectors are converted to a dense numpy matrix
* The metric name 'cosine' is not used in Annoy, so the default metric
  in char_ngram_process was changed to 'angular' (the closest analogue)
  	* sklearn's pairwise_distances function doesn't have an
	  'angular' metric so 'cosine' is used in process.ratio in place
	  of 'angular'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant