# NOT RUN {
mem_file = system.file("extdata", "ftest.expression.txt", package="smfishHmrf")
nei_file = system.file("extdata", "ftest.adjacency.txt", package="smfishHmrf")
block_file = system.file("extdata", "ftest.blocks.txt", package="smfishHmrf")
par_k = 9
name = "test"
output_dir = tempdir()
# }
# NOT RUN {
kk = smfishHmrf.generate.centroid.it(mem_file, par_k, par_seed=100,
nstart=100, name=name, output_dir=output_dir)
# }
# NOT RUN {
# alternatively, if you already have run kmeans before, you can load it directly
kmeans_results = system.file("extdata", package="smfishHmrf")
kk = smfishHmrf.generate.centroid.use.exist(name=name, input_dir=kmeans_results, par_k)
smfishHmrf.hmrfem.multi.it.min(mem_file, nei_file, block_file, kk, par_k,
name=name, output_dir=output_dir, tolerance=1e-5,
beta=28, beta_increment=2, beta_num_iter=1)
# }
# NOT RUN {
# alternatively, to test a larger set of beta's
smfishHmrf.hmrfem.multi.it.min(mem_file, nei_file, block_file, kk, par_k,
name=name, output_dir=output_dir, tolerance=1e-5,
beta=0, beta_increment=2, beta_num_iter=20)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab