Skip to content

Commit e45b9a3

Browse files
committed
Merge pull request #13 from snoweye/master
0.1-7 on CRAN
2 parents a1ec989 + bdaea27 commit e45b9a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+115
-77
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2015-11-01: Ver. 0.1-7
2+
* Change SPMD.CT$* to .pbd_env$SPMD.CT$*.
3+
14
2014-06-21: Ver. 0.1-7
25
* Migrate to MS-MPI.
36
* Get rid of jss.cls and jss.bst.

DESCRIPTION

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,36 @@
11
Package: pmclust
22
Version: 0.1-7
3-
Date: 2014-05-24
4-
Title: Parallel Model-Based Clustering
3+
Date: 2016-06-07
4+
Title: Parallel Model-Based Clustering using
5+
Expectation-Gathering-Maximization Algorithm for Finite Mixture
6+
Gaussian Model
57
Authors@R: c(person("Wei-Chen", "Chen", role = c("aut", "cre"), email =
68
"[email protected]"), person("George", "Ostrouchov", role = "aut"))
7-
Depends: R (>= 3.0.0), methods, rlecuyer, pbdMPI (>= 0.2-3), MASS,
8-
pbdSLAP (>= 0.1-9), pbdBASE (>= 0.3-0), pbdDMAT (>= 0.3-0)
9+
Depends: R (>= 3.0.0), pbdMPI (>= 0.3-1), pbdBASE (>= 0.4-3), pbdDMAT
10+
(>= 0.4-0)
11+
Imports: methods, MASS
912
Enhances: MixSim
1013
LazyLoad: yes
1114
LazyData: yes
12-
Description: The pmclust aims to utilize model-based clustering (unsupervised)
15+
Description: Aims to utilize model-based clustering (unsupervised)
1316
for high dimensional and ultra large data, especially in a distributed
14-
manner. The package employs Rmpi to perform a
15-
expectation-gathering-maximization (EGM) algorithm
17+
manner. The code employs pbdMPI to perform a
18+
expectation-gathering-maximization algorithm
1619
for finite mixture Gaussian
17-
models. The unstructured dispersion matrices are assumed in the Gaussian
18-
models. The implementation is default in the single program multiple
19-
data (SPMD) programming model. The code can be executed through Rmpi and
20-
independent to most MPI applications. See the High Performance
21-
Statistical Computing (HPSC) website for more information, documents
20+
models. The unstructured dispersion matrices are assumed in the
21+
Gaussian models. The implementation is default in the single program
22+
multiple data programming model. The code can be executed
23+
through pbdMPI and independent to most MPI applications.
24+
See the High Performance
25+
Statistical Computing website for more information, documents
2226
and examples.
2327
License: GPL (>= 2)
2428
URL: http://r-pbd.org/
2529
BugReports: http://group.r-pbd.org/
2630
MailingList: Please send questions and comments regarding pbdR to
2731
28-
Packaged: 2015-09-17 18:39:55 UTC; snoweye
32+
NeedsCompilation: yes
33+
Packaged: 2016-01-24 20:10:34 UTC; snoweye
2934
Author: Wei-Chen Chen [aut, cre],
3035
George Ostrouchov [aut]
3136
Maintainer: Wei-Chen Chen <[email protected]>
32-
NeedsCompilation: yes

NAMESPACE

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
useDynLib(pmclust)
22

3-
import(methods, rlecuyer, pbdMPI, MASS, pbdSLAP, pbdBASE, pbdDMAT)
3+
import(methods, MASS, pbdBASE, pbdDMAT)
4+
importFrom(stats,rnorm)
5+
importFrom(pbdMPI,spmd.allgather.integer)
6+
importFrom(pbdMPI,spmd.allgather.object)
7+
importFrom(pbdMPI,spmd.allreduce.integer)
8+
importFrom(pbdMPI,spmd.allreduce.double)
9+
importFrom(pbdMPI,spmd.bcast.integer)
10+
importFrom(pbdMPI,spmd.bcast.object)
11+
importFrom(pbdMPI,spmd.comm.rank)
12+
importFrom(pbdMPI,spmd.comm.size)
13+
importFrom(pbdMPI,spmd.isend.double)
14+
importFrom(pbdMPI,spmd.recv.double)
15+
importFrom(pbdMPI,spmd.wait)
16+
importFrom(pbdMPI,comm.all)
17+
importFrom(pbdMPI,comm.any)
18+
importFrom(pbdMPI,comm.cat)
19+
importFrom(pbdMPI,comm.size)
20+
importFrom(pbdMPI,comm.stop)
21+
importFrom(pbdMPI,get.jid)
422

523
# exportPattern("^[[:alpha:]]+")
624
# exportPattern("^[\\.]")

R/000_globalVariables.r

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Do not delete this file and file name!!
2+
### This file should be loaded before all other *.r files.
3+
4+
### This is to avoid the false positive messages from R CMD check.
5+
### "no visible binding for global variable"
6+
### Suggested by Prof Brian Ripley
7+
### ?globalVariables
8+
9+
if(getRversion() >= "2.15.1"){
10+
utils::globalVariables(c(".pmclustEnv", ".PMC.CT"))
11+
}

R/00_pmclust.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pmclust <- function(X = NULL, K = 2, MU = NULL,
44
algorithm = .PMC.CT$algorithm, RndEM.iter = .PMC.CT$RndEM.iter,
55
CONTROL = .PMC.CT$CONTROL, method.own.X = .PMC.CT$method.own.X,
6-
rank.own.X = .SPMD.CT$rank.source, comm = .SPMD.CT$comm){
6+
rank.own.X = .pbd_env$SPMD.CT$rank.source, comm = .pbd_env$SPMD.CT$comm){
77
if(comm.all(is.null(X))){
88
# Check global matrix.
99
A <- exists("X.spmd", envir = .GlobalEnv)
@@ -68,7 +68,7 @@ pmclust <- function(X = NULL, K = 2, MU = NULL,
6868
pkmeans <- function(X = NULL, K = 2, MU = NULL,
6969
algorithm = c("kmeans", "kmeans.dmat"),
7070
CONTROL = .PMC.CT$CONTROL, method.own.X = .PMC.CT$method.own.X,
71-
rank.own.X = .SPMD.CT$rank.source, comm = .SPMD.CT$comm){
71+
rank.own.X = .pbd_env$SPMD.CT$rank.source, comm = .pbd_env$SPMD.CT$comm){
7272
if(comm.all(is.null(X))){
7373
# Check global matrix.
7474
A <- exists("X.spmd", envir = .GlobalEnv)

R/00_pmclust_internal.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pmclust.internal <- function(X = NULL, K = 2, MU = NULL,
44
algorithm = .PMC.CT$algorithm.gbd, RndEM.iter = .PMC.CT$RndEM.iter,
55
CONTROL = .PMC.CT$CONTROL, method.own.X = .PMC.CT$method.own.X,
6-
rank.own.X = .SPMD.CT$rank.source, comm = .SPMD.CT$comm){
6+
rank.own.X = .pbd_env$SPMD.CT$rank.source, comm = .pbd_env$SPMD.CT$comm){
77
# Check.
88
if(! (algorithm[1] %in% .PMC.CT$algorithm.gbd)){
99
comm.stop("The algorithm is not supported")

R/00_pmclust_internal_dmat.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pmclust.internal.dmat <- function(X = NULL, K = 2, MU = NULL,
44
algorithm = .PMC.CT$algorithm.dmat, RndEM.iter = .PMC.CT$RndEM.iter,
55
CONTROL = .PMC.CT$CONTROL, method.own.X = .PMC.CT$method.own.X,
6-
rank.own.X = .SPMD.CT$rank.source, comm = .SPMD.CT$comm){
6+
rank.own.X = .pbd_env$SPMD.CT$rank.source, comm = .pbd_env$SPMD.CT$comm){
77
# Check.
88
if(! (algorithm[1] %in% .PMC.CT$algorithm.dmat)){
99
comm.stop("The algorithm is not supported.")

R/01_as_dmat.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Convert X.spmd to X.dmat
22

3-
as.dmat <- function(X.spmd, bldim = pbdDMAT::.BLDIM, ICTXT = pbdDMAT::.ICTXT,
4-
comm = .SPMD.CT$comm){
3+
as.dmat <- function(X.spmd, bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$ICTXT,
4+
comm = .pbd_env$SPMD.CT$comm){
55
X.spmd <- load.balance(X.spmd, comm = comm)
66

77
N.spmd <- nrow(X.spmd)

R/01_as_spmd.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Convert X.dmat to X.spmd
22

3-
as.spmd <- function(X.dmat, comm = .SPMD.CT$comm){
3+
as.spmd <- function(X.dmat, comm = .pbd_env$SPMD.CT$comm){
44
COMM.SIZE <- comm.size(comm)
55

66
### check data.
@@ -12,7 +12,7 @@ as.spmd <- function(X.dmat, comm = .SPMD.CT$comm){
1212

1313
### block-cyclic in context 2.
1414
bldim.new <- c(ceiling(nrow(X.dmat) / COMM.SIZE), ncol(X.dmat))
15-
X.dmat <- pbdDMAT::dmat.reblock(X.dmat, bldim = bldim.new, ICTXT = 2)
15+
X.dmat <- pbdDMAT::reblock(X.dmat, bldim = bldim.new, ICTXT = 2)
1616

1717
### copy to spmd.
1818
if(pbdBASE::base.ownany(dim(X.dmat), pbdDMAT::bldim(X.dmat), ICTXT = 2)){

R/02_convert_data.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### For general methods.
22

33
convert.data <- function(X, method.own.X = .PMC.CT$method.own.X,
4-
rank.own.X = .SPMD.CT$rank.source, comm = .SPMD.CT$comm){
4+
rank.own.X = .pbd_env$SPMD.CT$rank.source, comm = .pbd_env$SPMD.CT$comm){
55
COMM.SIZE <- spmd.comm.size(comm)
66
COMM.RANK <- spmd.comm.rank(comm)
77

0 commit comments

Comments
 (0)