Change API for KNNIndex.__init__ and KNNIndex.build so that data and k are specified in the constructor. This makes more sense in light of the precomputed distance class. This is against what I usually say, that the API needs to be backwards compatible, but I strongly suspect this is so deep within the library that nobody has ever done anything with it. So I think it should be okay here.
Change API for TSNE.__init__ and TSNE.fit, removing the affinities parameter from the constructor. This lead to some very strange function calls. We now change .fit so that either a data matrix can be passed in, or an affinity object. Optionally, the user can specify the initialization as well. Same goes for prepare_partial. Again, this is such niche usage, I doubt anyone will have problems with this.
Description of changes
Fixes #170.
KNNIndex.__init__
andKNNIndex.build
so thatdata
andk
are specified in the constructor. This makes more sense in light of the precomputed distance class. This is against what I usually say, that the API needs to be backwards compatible, but I strongly suspect this is so deep within the library that nobody has ever done anything with it. So I think it should be okay here.TSNE.__init__
andTSNE.fit
, removing theaffinities
parameter from the constructor. This lead to some very strange function calls. We now change.fit
so that either a data matrix can be passed in, or an affinity object. Optionally, the user can specify the initialization as well. Same goes forprepare_partial
. Again, this is such niche usage, I doubt anyone will have problems with this.Includes