Coder Social home page Coder Social logo

smallvis's Introduction

Writing

I think about dimensionality reduction a lot, but currently have no need or urge to publish in the stick-a-PDF-on-arXiv sense. As a result, I have managed to accumulate various markdown documents and notebooks scattered across many repositiories. I am losing track of it all myself, so here I collect in one place some of the discussions, experiments and other musings.

smallvis's People

Contributors

jlmelville avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

smallvis's Issues

Error in if (Z == 0) { : missing value where TRUE/FALSE needed

Thank you for such an extensive package and for including examples for each and every function. The example with iris runs no problem; I try to reproduce for diff dataset of similar str() but I get the following error:

Load dataset, inspect str

i:

URL  <- "http://bit.ly/data_shannon_error"
goblins_df <- read.csv(URL) 
utils::str(goblins_df)

o:

'data.frame':	373 obs. of  9 variables:
 $ bone_length  : num  0.355 0.324 0.63 0.472 0.469 ...
 $ rotting_flesh: num  0.351 0.431 0.581 0.494 0.517 ...
 $ hair_length  : num  0.466 0.205 0.647 0.557 0.621 ...
 $ has_soul     : num  0.781 0.258 0.505 0.564 0.625 ...
 $ red          : int  255 255 255 255 255 255 255 255 255 255 ...
 $ green        : int  255 255 255 255 255 255 255 255 255 255 ...
 $ blue         : int  255 255 255 255 255 255 255 255 255 255 ...
 $ alpha        : int  0 0 0 0 0 0 0 0 0 0 ...
 $ type         : Factor w/ 3 levels "Ghost","Ghoul",..: 2 1 2 2 3 2 2 2 3 3 ...

smallvis() call

i:

tsne <- smallvis(data, 
                          perplexity = 30, 
                          verbose    = TRUE)

Error:

o:

Error in if (Z == 0) { : missing value where TRUE/FALSE needed
6.shannon(Di, beta[i])
5.x2aff(X, perplexity, tol = 1e-05, kernel = kernel, verbose = verbose)
4.sne_init(cost, X, perplexity = perplexity, kernel = inp_kernel, symmetrize = "symmetric", normalize = TRUE, verbose = verbose, ret_extra = ret_extra)
3.cost$init(cost, X, verbose = verbose, ret_extra = ret_extra, max_iter = max_iter)
2.cost_init(cost_fn, X, max_iter = max_iter, verbose = verbose, ret_extra = ret_optionals)
1.smallvis(data, perplexity = 30, verbose = TRUE)

Does it have sth to do with shannon()? I ctrl + F in your code and source code from pgirmess ::shannon() but can't seem to detect where this error is exported from.

Unable to install smallvis

Hi there, I followed your readme and installed RSpectra and vizier successfully, but could not install smallvis. Hopefully there is something small I missed!

Thank you.

> library(RSpectra)
> library(vizier)
> devtools::install_github("jlmelville/smallvis/smallvis")
Downloading GitHub repo jlmelville/smallvis@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  download from 'https://api.github.com/repos/jlmelville/smallvis/tarball/HEAD' failed
> R.version.string
[1] "R version 4.2.1 (2022-06-23)"
> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.6.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] devtools_2.4.5        usethis_2.1.6         vizier_0.4.2          RSpectra_0.16-1       data.table_1.14.6     ComplexHeatmap_2.12.1
 [7] BiocParallel_1.30.4   forcats_0.5.2         stringr_1.4.1         dplyr_1.0.10          purrr_0.3.5           readr_2.1.3          
[13] tidyr_1.2.1           tibble_3.1.8          ggplot2_3.4.0         tidyverse_1.3.2       SeuratObject_4.1.3    Seurat_4.3.0         
[19] SCopeLoomR_0.13.0     SCENIC_1.3.1          AUCell_1.18.1         flowCore_2.8.0       

A reference for scaled PCA initialisation

Hey, do you by any chance know of any reference for the scaled PCA initialization? Perhaps there is some paper that at least mentions PCA initialization as a possibility and explicitly says that one needs to use scaled PCA in this case? I am not able to find any reference at all.

I looked here https://jlmelville.github.io/smallvis/init.html and here http://jlmelville.github.io/sneer/references.html but did not find anything. In fact, in your References list you cite our preprint in the Initialization setting, but I think I borrowed the scaled PCA idea from your pages :-) I am preparing a revision right now and it'd be good to have some reference for this...

smallvis_rep() not working

Very useful and fun package. But trying to run the sample code, I get an error messge.

library(smallvis)
tsne_iris_best <- smallvis_rep(nrep = 10, iris, perplexity = 25, ret_extra = TRUE)

23:16:10 Starting embedding # 1 of 10
Error in make_smallvis_cb(X) : argument "X" is missing, with no default

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.