google / patents-public-data

Patent analysis using the Google Patents Public Datasets on BigQuery
https://bigquery.cloud.google.com/dataset/patents-public-data:patents
Apache License 2.0
539 stars 163 forks source link

Sklearn 1.1.1 Issue #63

Open jricharva opened 2 years ago

jricharva commented 2 years ago

I cant get this to work with the latest version of Sklearn 1.1.1 Its something related to the NearestNeighbors function in the latest version of this library

Here is the error in the cell #@markdown Run the clustering algorithm, calculate cluster characteristics and visualize.

--> 294 nbrs = NearestNeighbors(nneighbors + 1, metric=metric).fit(x) 295 , indices = nbrs.kneighbors(x) 297 indices = nbrs.kneighbors(x)

TypeError: NearestNeighbors.init() takes 1 positional argument but 2 positional arguments (and 1 keyword-only argument) were given

This is called in this section of code

Step 1.

Add 1 since NearestNeighbors returns itself as a nearest point.

nbrs = NearestNeighbors(nneighbors + 1, metric=metric).fit(x) , indices = nbrs.kneighbors(x)

Cant seem to get past this one

alekssadowski95 commented 2 years ago

@jricharva What do I have to do to replicate this? What needs to be run and how does it need to be run?