karpathy / tsnejs

Implementation of t-SNE visualization algorithm in Javascript.
858 stars 155 forks source link

Added optional metric parameter for raw data init #6

Open Slater-Victoroff opened 8 years ago

Slater-Victoroff commented 8 years ago

@karpathy Small pull request that's really just some syntax sugar. Let's people pass in a function to the initDataRaw function that will serve as a replacement distance metric to L2. Technically already possible by just pre-computing the distances and passing those into the initDataDist function, but this makes it a bit nicer to use.

Hope this is useful functionality for others.