terminate called after throwing an instance of 'std::logic_error'
Closed this issue · 0 comments
Linshiqi-Git commented
Hello,
There's an error which I cannot traceback.
The input matrix is a matrix of 19752*16, and I want to reduce the dimensionality of 16 dimensions to 2 dimensions.
When I used the first 1000 examples, the code ran smoothly. But when I increase to 5000 examples, I get the following error.
> head(data)
V1 V2 V3 V4 V5 V6 V7
1: -0.035533 -0.269505 -0.242356 -0.346642 0.215485 -0.270419 -0.084026
2: 0.365067 -0.013597 -0.198735 -0.202712 -0.172067 0.081563 0.406164
3: -0.116263 -0.763487 -0.766170 -1.050907 0.646879 -0.769130 -0.270211
4: -0.054875 -0.936998 -0.958534 -1.295586 0.733142 -0.917629 -0.134953
5: -0.077013 -0.059518 -0.105835 0.194416 0.055624 -0.000481 0.128617
6: -0.110590 -0.435528 -0.412089 -0.599555 0.373934 -0.477969 -0.207258
V8 V9 V10 V11 V12 V13 V14
1: 0.037065 -0.101412 0.100584 -0.054974 0.050207 0.031419 -0.099805
2: 0.263552 0.138655 -0.276181 0.314461 -0.824125 -0.083640 0.190374
3: 0.087700 -0.333627 0.350103 -0.266656 0.181778 0.078066 -0.329959
4: 0.243693 -0.281359 0.230305 -0.141352 -0.024434 0.110799 -0.277720
5: -0.002416 -0.001282 -0.138842 -0.014105 -0.023678 0.066954 0.080230
6: 0.010906 -0.217827 0.231002 -0.210552 0.208879 0.036738 -0.257102
V15 V16
1: -0.153969 0.175217
2: -0.014546 -0.137743
3: -0.532380 0.551592
4: -0.589061 0.559640
5: 0.060884 -0.101197
6: -0.307401 0.352396
> vis=largeVis(t(data), dim=2,max_iter = 2,threads = 1,verbose=TRUE)
Searching for neighbors.
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
terminate called after throwing an instance of 'std::logic_error'
what(): median(): detected NaN
Aborted (core dumped)
My R environment is
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /software/biosoft/software/python/python2020/lib/libblas.so.3.6.0
LAPACK: /software/biosoft/software/python/python2020/lib/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] data.table_1.14.2 largeVis_0.2 Matrix_1.5-1 Rcpp_1.0.9
loaded via a namespace (and not attached):
[1] lattice_0.20-44 fansi_1.0.3 assertthat_0.2.1 dplyr_1.0.10
[5] utf8_1.2.2 grid_4.0.2 R6_2.5.1 DBI_1.1.3
[9] lifecycle_1.0.3 gtable_0.3.0 magrittr_2.0.3 scales_1.2.1
[13] pillar_1.8.1 ggplot2_3.3.6 rlang_1.0.6 cli_3.4.1
[17] generics_0.1.3 vctrs_0.4.2 glue_1.6.2 munsell_0.5.0
[21] compiler_4.0.2 pkgconfig_2.0.3 colorspace_2.0-3 tidyselect_1.2.0
[25] tibble_3.1.8
Thanks & regards!