LDFLAGS = -lm -lgsl -lcblas
TEST_LDFLAGS = -L. libvalse_core.so
LIB = libvalse_core.so
-LIB_SRC = $(wildcard ../pkg/src/sources/*.c)
+LIB_SRC = ../pkg/src/EMGLLF.c ../pkg/src/EMGrank.c
LIB_OBJ = $(LIB_SRC:.c=.o)
-INCLUDES = -I../pkg/src/sources
+INCLUDES = -I../pkg/src
TESTS = test.EMGLLF test.EMGrank
all: $(LIB) $(TESTS)
$(CC) -fPIC -o $@ -c $< $(CFLAGS) $(INCLUDES)
clean:
- rm -f *.o ../pkg/src/sources/*.o
+ rm -f *.o ../pkg/src/*.o
cclean: clean
rm -f *.so ../pkg/src/*.so $(TESTS)
{
meanX = rep(0, p)
covX = diag(p)
- covY = array(dim=c(m,m,k))
- for(r in 1:k)
- covY[,,r] = diag(m)
- π = rep(1./k,k)
+ covY = diag(m)
+ ω = rep(1./k,k)
#initialize beta to a random number of non-zero random value
β = array(0, dim=c(p,m,k))
for (j in 1:p)
{
nonZeroCount = sample(1:m, 1)
- β[j,1:nonZeroCount,] = matrix(runif(nonZeroCount*k), ncol=k)
+ if (nonZeroCount >= 2)
+ β[j,1:nonZeroCount,] = matrix(runif(nonZeroCount*k), ncol=k)
+ else
+ β[j,1,] = runif(k)
}
- sample_IO = generateXY(n, Ï\80, meanX, β, covX, covY)
+ sample_IO = generateXY(n, Ï\89, meanX, β, covX, covY)
return (list(X=sample_IO$X,Y=sample_IO$Y))
}