-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
325 lines (325 loc) · 11.8 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
library(HnndPR)
file.path('e:', "Samusik/data/Samusik_01.fcs")
source('F:/Download_code/TPE/tpe/R/HnndPR/R/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/R/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/R/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/R/test_HNND_pattern_recognition.R', echo=TRUE)
source('F:/Download_code/TPE/tpe/R/HnndPR/R/test_HNND_pattern_recognition.R', echo=TRUE)
source('F:/Download_code/TPE/tpe/R/HnndPR/R/test_HNND_pattern_recognition.R')
library(HnndPR)
library(HnndPR)
clc
clear all
clc
library(HnndPR)
devtools::use_vignette("introduction")
library("devtools")
v
library(roxygen2)
library(HnndPR)
document()
library(HnndPR)
library(HnndPR)
document()
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/R/load_data.R', encoding = 'UTF-8', echo=TRUE)
data('single.cell.mrna.pollen')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R', echo=TRUE)
load_data('single.cell.mrna.pollen')
source('F:/Download_code/TPE/tpe/R/HnndPR/R/load_data.R', encoding = 'UTF-8', echo=TRUE)
data('single.cell.mrna.pollen')
data('single.cell.mrna.pollen')
single.cell.mrna.pollen$x
x = single.cell.mrna.pollen$x
library('HnndPR')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
debugSource('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
data_name
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
load("bipolar_pca100.Rdata")
load("bipolar_pca100.Rdata")
data("bipolar_pca100.Rdata")
data_name == 'bipolar'
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
flowCore::exprs(flowCore::read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE))
files <- list(
Samusik_01 = "Samusik_01.fcs",
Samusik_all = "Samusik_all.fcs"
)
data_name
files[[data_name]]
flowCore::read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE)
a = flowCore::read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE)
a = flowCore::read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE)
a = flowCore::read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE)
a = flowCore::read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE)
a = flowCore::read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE)
a = flowCore::read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE)
library(flowCore)
a = read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE)
files[[data_name]]
files <- list(
Samusik_01 = "Samusik_01.fcs",
Samusik_all = "Samusik_all.fcs"
)
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
files <- list(
Samusik_01 = "Samusik_01.fcs",
Samusik_all = "Samusik_all.fcs"
)
x <- flowCore::exprs(flowCore::read.FCS(files[[data_name]], transformation = FALSE, truncate_max_range = FALSE))
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
document()
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
document()
library(HnndPR)
document()
library("HnndPR", lib.loc="F:/R/R-3.5.1/library")
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
document()
library("HnndPR", lib.loc="F:/R/R-3.5.1/library")
library(HnndPR)
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
library(HnndPR)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
result_all = rbind(result_all,data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label))))
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R', echo=TRUE)
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPRdata/Clustering-by-HNND-PR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPRdata/Clustering-by-HNND-PR/test/test_HNND_pattern_recognition.R')
source('F:/Download_code/TPE/tpe/R/HnndPRdata/Clustering-by-HNND-PR/test/test_HNND_pattern_recognition.R')
library('HnndPR')
# datasets ----------------------------------------------------------------
data_names_ori = 'cytof_h1'
data_name = 'cytof_h1'
TestData=load_data(data_name)
N = nrow(TestData$x)
K_empircal = ceiling(log2(N))
result <- HNND(
x = TestData$x,
K = K_empircal,h = K_empircal)
CScores = Evaluate_clustering_result(data_name,result$Label,TestData$annotation_data,EvaIndex = c('NMI','ARI'))
round(CScores$NMI,digits = 3)
round(CScores$ARI,digits = 3)
rm(list = ls())
load_data(data_name)
load_data('cytof_h1')
Rdata('cytof_h1')
load('cytof_h1')
data('cytof_h1')
data('data/cytof_h1')
data('/data/cytof_h1')
data('data/cytof.benchmark.h1.rda')
Rdata('data/cytof.benchmark.h1.rda')
load('data/cytof.benchmark.h1.rda')
TestData=load_data('cytof_h1')
N = nrow(TestData$x)
K = ceiling(log2(N))
result <- HNND(
x = TestData$x,
K = K_empircal,
h = K_empircal,
disName = "euclidean",
LogPlot = '')
TestData=load_data('cytof_h1')
N = nrow(TestData$x)
K = ceiling(log2(N))
result <- HNND(
x = TestData$x,
K = K,
h = K,
disName = "euclidean",
LogPlot = '')
CScores = Evaluate_clustering_result(data_name,result$Label,TestData$annotation_data,EvaIndex = c('NMI','ARI'))
result_all = rbind(result_all,data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label))))
print(result_all)
CScores = Evaluate_clustering_result(data_name,result$Label,TestData$annotation_data,EvaIndex = c('NMI','ARI'))
data_name = 'cytof_h1'
CScores = Evaluate_clustering_result(data_name,result$Label,TestData$annotation_data,EvaIndex = c('NMI','ARI'))
result_all = rbind(result_all,data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label))))
print(result_all)
result_all = rbind(result_all,data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label))))
data_name
round(CScores$NMI,digits = 3)
round(CScores$ARI,digits = 3)
round(Totoltime-result$time_DG,digits = 3)
source('F:/Download_code/TPE/tpe/R/HnndPRdata/Clustering-by-HNND-PR-Github/test/Demo1.R')
round(Totoltime-result$time_DG,digits = 3)
length(unique(result$Label)))
length(unique(result$Label))
data_name
result_all = rbind(result_all,data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label))))
round(CScores$NMI,digits = 3)
ncol(TestData$x)
data_name
result = data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label)))
print(result)
result = data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
ClusterNumber = length(unique(result$Label)))
print(result)
result = data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
ClusterNumber = length(unique(result$Label)))
result = data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label)))
result = data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label)))
data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label)))
a = data.frame(
DataName = data_name,
N = N,
Dim = ncol(TestData$x),
NMI = round(CScores$NMI,digits = 3),
ARI = round(CScores$ARI,digits = 3),
Totoltime = round(Totoltime-result$time_DG,digits = 3),
Cnum = length(unique(result$Label)))
a
source('F:/Download_code/TPE/tpe/R/HnndPRdata/Clustering-by-HNND-PR-Github/test/Demo1.R')
library(HnndPR)
library(HnndPR)
library(HnndPR)
roxygenize('.')
library(roxygen2)
roxygenize('.')
roxygenize('.')
library(HnndPR)
devtools::document()
devtools::document()
library(HnndPR)
devtools::document()
devtools::document()
library(HnndPR)
cl()
clear
clear all
cl(list())
c(list())
data_name = 'cytof_h1'
data(data_name)
data_name = 'cytof.benchmark.h1'
data(data_name)
data('cytof.benchmark.h1')
x = cytof.benchmark.h1$x
library(HnndPR)
devtools::document()
library(HnndPR)
devtools::document()
library(HnndPR)
devtools::document()
devtools::document()
devtools::document()
devtools::load_all(".")
library(HnndPR)
data('cytof.benchmark.h1')
x = cytof.benchmark.h1$x
K = ceiling(log2(nrow(x)))
result <- HNND_C(x = x,K = K,h = K,disName = "euclidean",LogPlot = '')
devtools::document()
source('F:/Download_code/TPE/tpe/R/HnndPRdata/Clustering-by-HNND-PR-Github/test/Demo1.R')
library("HnndPR", lib.loc="F:/R/R-3.5.1/library")
devtools::document()
library(HnndPR)