text stringlengths 128 2.05k |
|---|
Remarks . This model of angiogenesis is rather simplistic but constitutes a nice foundation for later models that take into account spatial considerations. A more significant drawback is that the model does not attempt to suggest a link between the different fitness costs and benefits and the underlying biological mech... |
Model II . The first extension to this model was proposed by Bach et al bach:2001 suggesting a game with interactions between three players. In this game the benefit of angiogenesis is obtained only when at least two of the three players produce the angiogenic factor. The new payoff table is shown in table |
Results . The authors produce simulations using table and show (see figure ) that this game yields results than differ from the original ones introduced by Tomlinson and Bodmer. In this case even when the cost i is smaller than the benefit j there are many scenarios for which the angiogenic strategy will be displaced f... |
Model III . In a separate research Bach et al bach:2003 studied how a spatial version of the angiogenesis game could produce different results to those of the original model by Tomlinson and Bodmer. In this game players inhabit a 100x100 lattice. Each player can follow either the angiogenic (A+) or the non-angiogenic (... |
Results . The authors found the results of the new formulation of the model markedly different from those of the non-spatial counterpart. In spatial models, space tends to favour growth promoters in ways that cannot be seen in the non-spatial model. In any case polymorphic equilibria do exist and in both spatial and no... |
0.4 Motility/invasion A tumour in which cells develop the capability of invading other tissues becomes a malignant tumour and thus significantly worsens the prognosis of a patient. EGT is a tool that could greatly improve our understanding of the circumstances that influence the successful evolution of invasive phenoty... |
Model I . Mansury and colleagues have recently introduced a rather unconventional EGT formulation that they used on top of a previous cellular automaton model in the context of brain tumours Mansury:2003 mansury:2006 . This GT module allows the original model to deal with cell-cell interactions in a tumour consisting o... |
Table shows how the cell to cell communication capabilities change according to the strategies followed by the interacting cells. Since the authors assume that there is a negative correlation between the extent of communication and proliferation then the proliferative capability of a cell with the proliferative strateg... |
Results .The authors used this model to study how varying the payoffs for A-A interactions affects a number of features of the tumour such as the speed (see figure ) at which it reaches the nutrient sources or the fractality of the resulting spatial patterns. |
Remarks . Although the model is interesting it is not as simple as other models reviewed in this chapter. A significant drawback is that the model is not evolutionary in the sense that it does not take into account the possibility of mutations introducing new phenotypes or tumour cells producing offspring different fro... |
Model II . The emergence of invasive phenotypes is influenced not only by its interaction with one phenotype or the other but by the complex interplay of several phenotypes which, in many cases has an indirect effect. Basanta et al. Basanta:2007 hypothesise a number of scenarios in which three types of phenotypes inter... |
Results . Table defines the interactions between the three phenotypes. The authors investigate a number of scenarios in which subgames based on two strategies are used to study how one phenotype could emerge in a tumour populated by cells that use a different strategy. The results show that cells with a higher replicat... |
0.5 Outlook The examples described in this chapter treat tumour populations as ecosystems of potentially co-operating and/or competing cells. In these ecosystems, the success of one phenotype depends on its interactions with other existing phenotypes. Such an approach has been shown to be a helpful and useful way to st... |
One more limitation of the GT models shown in this chapter is that they do not study the dynamics in a tumour population (dynamics which may or may not lead to an equilibrium). GT models that make use of population biology have the potential to overcome this limitation and also ease the connection between a quantitativ... |
The authors also conclude that any therapy that reduces the population density would be counterproductive since it would allow the more aggressive phenotypes to grow. Subsequent research uses the same formulation to study other stages of tumour progression like invasion and metastasis Vincent:2006 T.-L.-Vincent:2007 |
GT is also a suitable tool to frame cooperative effects. Evolution of co-operation is a sub-field of GT pioneered by Robert Axelrod Axelrod:1981 . Researchers in this field study the circumstances under which selfish agents will spontaneously co-operate. An example of how evolution of cooperation could be used to study... |
Evolutionary game theory has a relatively short history in the field of theoretical oncology but with an increasingly better understanding of the role of the microenvironment in tumour evolution Park:2000 and with the recent interest in studying cancer from ecological Crespi:2005 Merlo:2006 and phenotypic hanahan:2000 ... |
Acknowledgements We would like to acknowledge the help and suggestions from our colleagues at TU Dresden: Lutz Brusch, Haralambos Hatzikirou and Michael Kücken. The work in this paper was supported in part by funds from the EU Marie Curie Network ”Modeling, Mathematical Methods and Computer Simulation of Tumour Growth ... |
# Source: arxiv 0811.1081 # Title: Parallel GPU Implementation of Iterative PCA Algorithms # Sections: all # Downloaded: 2026-03-03T02:20:29.212015+00:00 |
Parallel GPU Implementation of Iterative PCA Algorithms Abstract Principal component analysis (PCA) is a key statistical technique for multivariate data analysis. For large data sets the common approach to PCA computation is based on the standard NIPALS-PCA algorithm, which unfortunately suffers from loss of orthogonal... |
Institute for Biocomplexity and Informatics University of Calgary 2500 University Drive NW, Calgary Alberta, T2N 1N4, Canada Introduction |
Principal component analysis (PCA) is one of the most valuable results from applied linear algebra, and probably the most popular method used for compacting higher dimensional data sets into lower dimensional ones for data analysis, visualization, feature extraction, or data compression Jackson, 1991 Jolliffe, 2002 PCA... |
We formulate an iterative PCA algorithm based on the Gram-Schmidt re-orthogonalization, which we called GS-PCA. This algorithm is stable from the orthogonality point of view, and if necessary, it can be used to calculate the full set of principal components. The speed up issue is tackled with a parallel implementation ... |
Methods 2.1 Iterative Principal Component Analysis In the following description, the dataset to be analyzed is represented by the [MATH] matrix [MATH] . Each column, [MATH] [MATH] contains all the observations of one attribute. Also, we assume that each column is mean centered, i.e. if [MATH] are the original vectors t... |
[EQUATION] PCA transforms the set of input column vectors [MATH] into another set of column vectors [MATH] , called principal component scores. This transformation has the property that most of the original data’s information content (or most of its variance) is stored in the first few component scores. This allows red... |
[EQUATION] where [MATH] is known as the loadings matrix. There are several PCA algorithms in the literature, namely SVD (singular value decomposition) and NIPALS (nonlinear iterative partial least squares), which use the data matrix, and POWER and EVD (eigenvalue decomposition) which use the covariance of the data matr... |
2.2 NIPALS-PCA Algorithm The NIPALS-PCA algorithm can be described as following Wold et al., 1987 Kramer, 1998 In the first step, the initial data [MATH] is copied into the residual matrix [MATH] Then, in the next steps the algorithm extracts iteratively one component at a time ( [MATH] ) by repeated regressions of [MA... |
on scores [MATH] to obtain improved loads [MATH] , and of [MATH] on these [MATH] to obtain improved scores [MATH] After the convergence is achieved, this process is followed by a deflation of the data matrix: |
[EQUATION] The convergence test consists in comparing two successive estimates of the eigenvalue [MATH] and [MATH] . If the absolute difference |
[MATH] is smaller than some small error [MATH] then the convergence is achieved and the algorithm proceeds to the deflation step. Using the NIPALS-PCA algorithm approach, the decomposition of the data matrix [MATH] takes the form: |
[EQUATION] where [MATH] is the matrix formed using the first [MATH] scores, [MATH] is the matrix of the first [MATH] loadings, and [MATH] is the residual matrix. The pseudo-code of the NIPALS-PCA algorithm is given below: |
[MATH] for( [MATH] ) do [MATH] [MATH] for( [MATH] ) do [MATH] [MATH] [MATH] [MATH] if( [MATH] ) then break [MATH] [MATH] return [MATH] [MATH] [MATH] |
2.3 GS-PCA Algorithm A well known shortcoming of the NIPALS-PCA algorithm is the loss of orthogonality Kramer, 1998 Both, the computed scores [MATH] and the loadings [MATH] , are supposed to be orthogonal. However, because of the errors accumulated at each iteration step (which involves large matrix-vector operations) ... |
For the pseudo-code formulation of the GS-PCA algorithm we prefer to use the truncated SVD description, since for [MATH] the algorithm also returns the full SVD decomposition of the input matrix: |
[EQUATION] where [MATH] and [MATH] are the first [MATH] left and respectively rigth eigenvectors, [MATH] are the corresponding eigenvalues, and [MATH] is the residual. One can easily show that |
[MATH] and [MATH] The pseudo-code of the GS-PCA algorithm can be formulated as following: [MATH] for( [MATH] ) do [MATH] [MATH] for( [MATH] ) do |
[MATH] if( [MATH] ) then [MATH] [MATH] [MATH] [MATH] if( [MATH] ) then [MATH] [MATH] [MATH] [MATH] if( [MATH] ) then break [MATH] |
[MATH] [MATH] [MATH] return [MATH] [MATH] [MATH] (for PCA) or [MATH] [MATH] [MATH] (for SVD) One can see that in every iteration step, if [MATH] then both the right (loads) and the left (scores) eigenvectors are re-orthonormalized. This procedure stabilizes the algorithm but it also increases a little bit the computati... |
Implementation Details The newly developed GPUs now include fully programmable processing units that follow a stream programming model and support vectorized single and double precision floating-point operations. For example, the CUDA computing environment provides a standard C like language interface to the NVIDIA GPU... |
NVIDIA, 2008 . The computation is distributed into sequential grids, which are organized as a set of thread blocks. The thread blocks are batches of threads that execute together, sharing local memories and synchronizing at specified barriers. An enormous number of blocks, each containing maximum 512 threads, can be la... |
In our implementation of NIPALS-PCA and GS-PCA algorithms we use CUBLAS, a recent parallel implementation of BLAS, developed by NVIDIA on top of the CUDA programming environment NVIDIA, 2008 CUBLAS library provides functions for: |
creating and destroying matrix and vector objects in GPU memory; transferring data from CPU mainmemory to GPU memory; executing BLAS on the GPU; |
transferring data from GPU memory back to the CPU mainmemory. BLAS defines a set of low-level fundamental operations on vectors and matrices which can be used to create optimized higher-level linear algebra functionality. Highly efficient implementations of BLAS exist for most current computer architectures and the spe... |
The CBLAS (GNU Scientific Library) and respectively CUBLAS (NVIDIA CUDA) implementations of the NIPALS-PCA and GS-PCA algorithms require the following Level 1, 2, 3 BLAS functions (see the CBLAS/CUBLAS programming manuals for definition details): |
CBLAS (Level 2): gsl_blas_dgemv CUBLAS (Level 2): cublasDgemv computes in double precision the matrix-vector product and sum: [EQUATION] |
[MATH] and [MATH] are double precision scalars, and [MATH] and [MATH] are double precision vectors. [MATH] is a matrix consisting of double precision elements. Matrix [MATH] is stored in column major format. |
CBLAS (Level 1): gsl_blas_daxpy CUBLAS (Level 1): cublasDaxpy computes the double precision sum: [EQUATION] multiplies double precision vector [MATH] by double precision scalar [MATH] and adds the result to double precision vector [MATH] |
CBLAS (Level 1): gsl_blas_dnrm2 CUBLAS (Level 1): cublasDnrm2 computes the Euclidean norm of a double precision vector [MATH] [EQUATION] |
CBLAS (Level 3): gsl_blas_dger CUBLAS (Level 3): cublasDger computes in double precision the matrix-matrix sum: [EQUATION] where [MATH] is a double precision scalar, [MATH] is an [MATH] element double precision vector, [MATH] is an [MATH] element double precision vector, and [MATH] is an [MATH] matrix consisting of dou... |
These are the critical functions/kernels which are efficiently exploited in the parallel CUBLAS implementation. The other involved functions are for vector/matrix memory allocation and vector/matrix accessing, device (GPU) initialization, host-device data transfer and error handling. |
In the CUBLAS implementation, the data space is allocated both on host (CPU) mainmemory and on device (GPU) memory. After the data is initialized on host it is transferred on device, where the main parallel computation occurs. The results are then transferred back on host memory. |
The double precision code for CBLAS and CUBLAS implementations are given in the Appendices 1, 2, 3 and 4. These implementations can be easily modified in order to meet the end user’s specifications. For example the single precision BLAS data allocation and vector/matrix accessing functions have the prefix gsl_vector_fl... |
The CBLAS (GSL) versions can be compiled using the following commands: g++ -O2 nipals_pca.cpp -lgsl -lgslcblas -lm g++ -O2 gs_pca.cpp -lgsl -lgslcblas -lm |
An obvious requirement for the CUBLAS (NVIDIA) version is the presence of an NVIDIA GPU installed. The GPU must be minimum GTX260, GTX280 or Tesla C1060, otherwise there is no support for double precision. Also, the NVIDIA Driver, Toolkit and SDK must be correctly instaled. In order to compile the CUBLAS (NVIDIA) versi... |
# Add source files here # (comment/uncomment your choice) EXECUTABLE := nipals_pca # for NIPALS-PCA # EXECUTABLE := gs_pca # for GS-PCA |
# C/C++ source files (compiled with gcc / c++) # (comment/uncomment your choice) CFILES := nipals_pca.c # for NIPALS-PCA # CFILES := gs_pca.c # for GS-PCA |
Results and Conclusion The numerical tests have been carried out on the following system: AMD Phenom 9950 CPU (2.6GHz); XFX GTX280 GPU; NVIDIA Linux 64-bit driver (177.67); CUDA Toolkit and SDK 2.0; Ubuntu Linux 64-bit 8.04.1, GNU Scientific Library v.1.11; Compilers: GCC (GNU), NVCC (NVIDIA). The GPU used is a high en... |
In Figure 1 we give the CPU vs GPU execution time as a function of the size of the randomly generated input matrix [MATH] [MATH] ). The time gap between CPU and GPU increases very fast by increasing the size of the input matrix, and the CPU time versus the GPU time reaches a maximum for [MATH] , where the GPU is about ... |
In conclusion, we have presented an iterative GS-PCA algorithm based on Gram-Schmidt re-orthogonalization. The GS-PCA algorithm assures the perfect orthogonality of both the loads and the scores, and thus totally eliminates the loss of orthogonality present in the standard NIPALS-PCA algorithm. Also, we have discussed ... |
Acknowledgement The author acknowledge the financial support from IBI and the University of Calgary. Appendix 1: nipals_pca.cpp // C/C++ example for the CBLAS (GNU Scientific Library) // implementation of the NIPALS-PCA algorithm // M. Andrecut (c) 2008 // // Compile with: g++ -O3 nipals.cpp -lgsl -lgslcblas -lm |
// includes, system #include <math.h> #include <time.h> // includes, GSL & CBLAS #include <gsl/gsl_vector.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_blas.h> |
// declarations int nipals_gsl(int, int, int, gsl_matrix *, gsl_matrix *, gsl_matrix *); int print_results(int, int, int, gsl_matrix *, gsl_matrix *, gsl_matrix *, gsl_matrix *); |
// main int main(int argc, char** argv) // PCA model: X = TP’ + R // input: X, MxN matrix (data) // input: M = number of rows in X // input: N = number of columns in X // input: K = number of components (K<=N) |
// output: T, MxK scores matrix // output: P, NxN loads matrix // output: R, MxN residual matrix int M = 1000, m; int N = M/2, n; int K = 25; |
printf("\nProblem dimensions: MxN=%dx%d, K=%d\n", M, N, K); // initialize srand and clock srand(time(NULL)); clock_t start=clock(); |
double htime; // initiallize some random test data X gsl_matrix *X = gsl_matrix_alloc(M, N); for(m=0; m<M; m++) for(n=0; n<N; n++) gsl_matrix_set(X, m, n, rand()/(double)RAND_MAX); // allocate memory for T, P, R |
gsl_matrix *T = gsl_matrix_alloc(M, K); gsl_matrix *P = gsl_matrix_alloc(N, K); gsl_matrix *R = gsl_matrix_alloc(M, N); htime = ((double)clock()-start)/CLOCKS_PER_SEC; |
printf("\nTime for data allocation: %f\n", htime); // call the nipals_gsl() function start=clock(); gsl_matrix_memcpy(R, X); nipals_gsl(M, N, K, T, P, R); |
htime = ((double)clock()-start)/CLOCKS_PER_SEC; printf("\n\nTime for NIPALS-PCA computation on host: %f\n", htime); // the results are in T, P, R |
print_results(M, N, K, X, T, P, R); // memory clean up and shutdown gsl_matrix_free(R); gsl_matrix_free(P); gsl_matrix_free(T); gsl_matrix_free(X); |
printf("\nPress ENTER to exit...\n"); getchar(); return EXIT_SUCCESS; int nipals_gsl(int M, int N, int K, gsl_matrix *T, gsl_matrix *P, gsl_matrix *R) // PCA model: X = TP’ + R |
// input: X, MxN matrix (data) // input: M = number of rows in X // input: N = number of columns in X // input: K = number of components (K<=N) |
// output: T, MxK scores matrix // output: P, NxK loads matrix // output: R, MxN residual matrix (X is initially copied in R) // maximum number of iterations |
int J = 10000; // max error double er = 1.0e-7; // some useful pointers double *a = (double*)calloc(1, sizeof(a)); double *b = (double*)calloc(1, sizeof(b)); int k, n, j; |
// mean center the data gsl_vector *U = gsl_vector_calloc(M); for(n=0; n<N; n++) gsl_blas_daxpy(1.0, &gsl_matrix_column(R, n).vector, U);Ψ |
for(n=0; n<N; n++) gsl_blas_daxpy(-1.0/N, U, &gsl_matrix_column(R, n).vector); for(k=0; k<K; k++) gsl_blas_dcopy(&gsl_matrix_column(R, k).vector, &gsl_matrix_column(T, k).vector); |
*a = 0.0; for(j=0; j<J; j++) gsl_blas_dgemv(CblasTrans, 1.0, R, &gsl_matrix_column(T, k).vector, 0.0, &gsl_matrix_column(P, k).vector);Ψ |
gsl_blas_dscal(1.0/gsl_blas_dnrm2(&gsl_matrix_column(P, k).vector), &gsl_matrix_column(P, k).vector); gsl_blas_dgemv(CblasNoTrans, 1.0, R, &gsl_matrix_column(P, k).vector, 0.0, &gsl_matrix_column(T, k).vector);ΨΨΨΨ |
*b = gsl_blas_dnrm2(&gsl_matrix_column(T, k).vector); Ψ if(fabs(*a - *b) < er*(*b)) break; *a = *b; gsl_blas_dger(-1.0, &gsl_matrix_column(T, k).vector, &gsl_matrix_column(P, k).vector, R); ΨΨ // clean up memory |
free(a); free(b); gsl_vector_free(U); return EXIT_SUCCESS; int print_results(int M, int N, int K, gsl_matrix *X, gsl_matrix *T, gsl_matrix *P, gsl_matrix *R) int m, n; |
// If M < 13 print the results on screen if(M > 12) return EXIT_SUCCESS; printf("\nX\n"); for(m=0; m<M; m++) for(n=0; n<N; n++) printf("%+f ", gsl_matrix_get(X, m, n)); printf("\n"); |
return EXIT_SUCCESS; Appendix 2: nipals_pca.c // C/C++ example for the CUBLAS (NVIDIA) // implementation of NIPALS-PCA algorithm // // M. Andrecut (c) 2008 |
// includes, system #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // includes, cuda #include <cublas.h> |
// matrix indexing convention #define id(m, n, ld) (((n) * (ld) + (m))) // declarations int nipals_cublas(int, int, int, double *, double *, double *); |
int print_results(int, int, int, double *, double *, double *, double *); // main int main(int argc, char** argv) // PCA model: X = T * P’ + R |
// output: T, MxK scores matrix // output: P, NxN loads matrix // output: R, MxN residual matrix int M = 1000, m; int N = M/2, n; int K = 25; ΨΨ printf("\nProblem dimensions: MxN=%dx%d, K=%d\n", M, N, K); |
// initialize srand and clock srand(time(NULL)); clock_t start=clock(); double dtime; // initialize cublas cublasStatus status; status = cublasInit(); |
if(status != CUBLAS_STATUS_SUCCESS) fprintf(stderr, "! CUBLAS initialization error\n"); return EXIT_FAILURE; // initiallize some random test data X |
double *X; X = (double*)malloc(M*N * sizeof(X)); if(X == 0) fprintf(stderr, "! host memory allocation error: X\n"); return EXIT_FAILURE; |
for(m = 0; m < M; m++) for(n = 0; n < N; n++) X[id(m, n, M)] = rand() / (double)RAND_MAX; // allocate host memory for T, P, R double *T; |
T = (double*)malloc(M*K * sizeof(T));; if(T == 0) fprintf(stderr, "! host memory allocation error: T\n"); return EXIT_FAILURE; double *P; |
P = (double*)malloc(N*K * sizeof(P));; if(P == 0) fprintf(stderr, "! host memory allocation error: P\n"); return EXIT_FAILURE; double *R; |
R = (double*)malloc(M*N * sizeof(R));; if(R == 0) fprintf(stderr, "! host memory allocation error: R\n"); return EXIT_FAILURE; ΨΨΨ dtime = ((double)clock() - start)/CLOCKS_PER_SEC; |
printf("\nTime for data allocation: %f\n", dtime); // call nipals_cublas() start=clock(); memcpy(R, X, M*N * sizeof(X)); nipals_cublas(M, N, K, T, P, R); |
dtime = ((double)clock() - start)/CLOCKS_PER_SEC; printf("\nTime for NIPALS-PCA computation on device: %f\n", dtime); print_results(M, N, K, X, T, P, R); |
// memory clean up free(R); free(P); Ψ free(T); free(X); // shutdown status = cublasShutdown(); if(status != CUBLAS_STATUS_SUCCESS) fprintf(stderr, "! cublas shutdown error\n"); return EXIT_FAILURE; |
if(argc <= 1 || strcmp(argv, "-noprompt")) printf("\nPress ENTER to exit...\n"); getchar(); return EXIT_SUCCESS; int nipals_cublas(int M, int N, int K, double *T, double *P, double *R) // PCA model: X = T * P’ + R |
// input: X, MxN matrix (data) // input: M = number of rows in X // input: N = number of columns in X (N<=M) // input: K = number of components (K<N) |
// output: T, MxK scores matrix // output: P, NxK loads matrix // output: R, MxN residual matrix // CUBLAS error handling cublasStatus status; |
// maximum number of iterations int J = 10000; // max error double er = 1.0e-7; int k, n, j; // transfer the host matrix X to device matrix dR |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.