-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.Rmd
75 lines (56 loc) · 2.32 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# bigmds
<!-- badges: start -->
<!-- badges: end -->
*MDS* is a statistic tool for reduction of dimensionality, using as input a distance matrix of dimensions
*n × n*. When *n* is large, classical algorithms suffer from computational problems and MDS configuration
can not be obtained. With this package, we address these problems by means of six algorithms,
being two of them original proposals:
- Landmark MDS proposed by De Silva V. and JB. Tenenbaum (2004).
- Interpolation MDS proposed by Delicado P. and C. Pachón-García (2021) <arXiv:2007.11919> (original proposal).
- Reduced MDS proposel by Paradis E (2018).
- Pivot MDS prposed by Brandes U. and C. Pich (2007)
- Divide-and-conquer MDS proposed by Delicado P. and C. Pachón-García (2021) <arXiv:2007.11919> (original proposal).
- Fast MDS, proposed by Yang, T., J. Liu, L. McMillan and W. Wang (2006).
To obtain more information, please read this [paper](https://arxiv.org/abs/2007.11919).
## Installation
You can install the development version of bigmds from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("pachoning/bigmds")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example}
library(bigmds)
x <- matrix(data = rnorm(4 * 10000), nrow = 10000) %*% diag(c(9, 4, 1, 1))
landmark_mds_conf <- landmark_mds(x = x, num_landmarks = 200, r = 2)
head(landmark_mds_conf$points)
landmark_mds_conf$eigen
interpolation_mds_conf <- interpolation_mds(x = x, l = 200, r = 2, n_cores = 1)
head(interpolation_mds_conf$points)
interpolation_mds_conf$eigen
reduced_mds_conf <- reduced_mds(x = x, l = 200, r = 2, n_cores = 1)
head(reduced_mds_conf$points)
reduced_mds_conf$eigen
pivot_mds_conf <- pivot_mds(x = x, num_pivots = 200, r = 2)
head(pivot_mds_conf$points)
pivot_mds_conf$eigen
divide_mds_conf <- divide_conquer_mds(x = x, l = 200, c_points = 5 * 2, r = 2, n_cores = 1)
head(divide_mds_conf$points)
divide_mds_conf$eigen
fast_mds_conf <- fast_mds(x = x, l = 200, s_points = 2*2, r = 2, n_cores = 1)
head(fast_mds_conf$points)
fast_mds_conf$eigen
```