module Data.Algorithm.TSNE (
tsne3D,
forTsne3D,
TSNEOptions(..),
TSNEOutput3D(..)
) where
import Pipes
import Data.Algorithm.TSNE.Types
import Data.Algorithm.TSNE.Internals
import Data.Algorithm.TSNE.Utils
tsne3D :: TSNEOptions -> TSNEInput -> Producer TSNEOutput3D IO ()
tsne3D opts input = do
st <- liftIO $ initState $ length input
runTSNE opts input ps st
where ps = neighbourProbabilities opts input
forTsne3D :: (TSNEOutput3D -> IO ()) -> TSNEOptions -> TSNEInput -> IO ()
forTsne3D action opts input = do
runEffect $ for (tsne3D opts input) $ \o -> do
lift $ action o