-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.Rhistory
90 lines (90 loc) · 2.54 KB
/
.Rhistory
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
library(devtools)
document()
library(RcppML) # need the dev version (install from GitHub)
library(microbenchmark) # install.packages("microbenchmark")
library(ggplot2) # install.packages("ggplot2")
data(hawaiibirds) # provided in the RcppML package
nmf_model <- FastNMF(hawaiibirds$counts, k = 10)
str(nmf_model)
document()
nmf_model2 <- FastNMF(hawaiibirds$counts, k = 10)
str(nmf_model2)
heatmap(nmf_model2$w, nmf_model$w)
str(nmf_model)
str(nmf_model2)
heatmap(RcppML::cosine(t(nmf_model2$w), t(nmf_model$w)))
document()
set.seed(123)
nmf_model <- FastNMF(hawaiibirds$counts, k = 10, mode = 1)
set.seed(123)
nmf_model <- FastNMF(hawaiibirds$counts, k = 10, mode = 2)
set.seed(123)
nmf_model2 <- FastNMF(hawaiibirds$counts, k = 10, mode = 1)
str(nmf_model)
str(nmf_model2)
heatmap(RcppML::cosine(t(nmf_model$h), t(nmf_model2$h)), scale = "none")
mb <- microbenchmark(
FastNMF(hawaiibirds$counts, k = 10, mode = 1),
FastNMF(hawaiibirds$counts, k = 10, mode = 2),
times = 10)
mb
autoplot(mb)
mb <- microbenchmark(
FastNMF(hawaiibirds$counts, k = 10, mode = 1),
FastNMF(hawaiibirds$counts, k = 10, mode = 2),
times = 100)
autoplot(mb)
mb
Rcpp::sourceCpp("src/nmf.cpp")
Rcpp::sourceCpp("src/nmf.cpp")
rand_spmat(10, 10, 16, 129874)
rand_spmat(10, 10, 16, 129874)
rand_spmat(10, 10, 16, 129874)
rand_spmat(10, 10, 16, 129874)
rand_spmat(10, 10, 16, 129874483)
rand_spmat(10, 100, 16, 129874483)
rand_mat(10, 10, 289374)
hist(rand_mat(10, 10, 289374))
hist(rand_mat(100, 100, 289374))
Rcpp::sourceCpp("src/nmf.cpp")
Rcpp::sourceCpp("src/nmf.cpp")
Rcpp::sourceCpp("src/nmf.cpp")
Rcpp::sourceCpp("src/nmf.cpp")
Rcpp::sourceCpp("src/nmf.cpp")
Rcpp::sourceCpp("src/nmf.cpp")
c_nmf_rand(198273874, 100, 100, 10, 10, 1e-4, 100, FALSE, 0, 0)
c_nmf_rand(198273874, 1000, 1000, 10, 10, 1e-4, 100, FALSE, 0, 0)
c_nmf_rand(198273874, 1000, 1000, 10, 10, 1e-5, 100, FALSE, 0, 0)
Rcpp::sourceCpp("src/nmf.cpp")
c_nmf_rand(198273874, 1000, 1000, 10, 10, 1e-5, 100, FALSE, 0, 0)
Rcpp::sourceCpp("src/nmf.cpp")
Rcpp::sourceCpp("src/nmf.cpp")
Rcpp::sourceCpp("src/nmf.cpp")
v <- run_benchmarking()
v
length(v)
Rcpp::sourceCpp("src/nmf.cpp")
v <- run_benchmarking()
length(v)
Rcpp::sourceCpp("src/nmf.cpp")
Rcpp::sourceCpp("src/nmf.cpp")
v <- run_benchmarking()
length(v)
Rcpp::sourceCpp("src/nmf.cpp")
library(devtools)
document()
document()
library(devtools)
devtools::install_github("zdebruine/FastNMF")
library(devtools)
install_github("zdebruine/FastNMF")
library(FastNMF)
v <- run_benchmarking()
Rcpp::sourceCpp("src/nmf.cpp")
getwd()
document()
library(devtools)
document()
document()
library(devtools)
document()