Commit 157da0cd authored by Antoine Lucas's avatar Antoine Lucas
Browse files

fix some compilation warnings

parent 8fcbe775
Package: amap
Version: 0.8-7
Date: 2010-11-07
Version: 0.8-8
Date: 2013-12-02
Title: Another Multidimensional Analysis Package
Author: Antoine Lucas
Maintainer: Antoine Lucas <antoinelucas@gmail.com>
......
#-------------------------------------------------------
#
# Created : 29/10/02
# Last Modified : Time-stamp: <2007-10-02 19:07:26 antoine>
# Last Modified : Time-stamp: <2013-12-02 19:32:49 antoine>
#
# Description : Principal component analysis
#
......@@ -67,24 +67,24 @@ print.acp <- function(x, ...)
# SECTION GRAPHIQUES
#
plot.acp <- function(x,i=1,j=2,text=TRUE,label='Composants',col='darkblue',main='Individuals PCA',variables=TRUE,labels=NULL,...)
plot.acp <- function(x,i=1,j=2,text=TRUE,label='Composants',col='darkblue',main='Individuals PCA',variables=TRUE,individual.label=NULL,...)
{
U <- x$scores
XLAB <- paste(label,i)
YLAB <- paste(label,j)
plot.new()
plot.window(range(U[,i]),range(U[,j]))
axis(1,label=TRUE,tick=TRUE)
axis(2,label=TRUE,tick=TRUE)
axis(1,labels=TRUE,tick=TRUE)
axis(2,labels=TRUE,tick=TRUE)
box()
title(xlab=XLAB,ylab=YLAB,main=main)
if(text){
if(is.null(labels))
if(is.null(individual.label))
{
labels=dimnames(x$scores)[[1]]
individual.label=dimnames(x$scores)[[1]]
}
text(labels=labels,U[,i],U[,j],col=col,...)
text(labels=individual.label,U[,i],U[,j],col=col,...)
}
else{
points(U[,i],U[,j],col=col,...)
......@@ -107,14 +107,14 @@ biplot.acp <- function(x,i=1,j=2,label='Composants',col='darkblue',length=0.1,ma
# PLOT DES AXES
plot.new()
plot.window(LIM,LIM)
axis(1,label=TRUE,tick=TRUE)
axis(2,label=TRUE,tick=TRUE)
axis(1,labels=TRUE,tick=TRUE)
axis(2,labels=TRUE,tick=TRUE)
box()
title(xlab=XLAB,ylab=YLAB,main=main)
# PLOT DU NOM DES FLECHES
text(U[,i]*1.3,U[,j]*1.3,labels=dimnames(U)[[1]],col=col)
text(x=U[,i]*1.3,y=U[,j]*1.3,labels=dimnames(U)[[1]],col=col)
# PLOT DES FLECHES
arrows(0,0,U[,i],U[,j],length = length,col=col)
......
......@@ -4,7 +4,7 @@ Dist <- function(x, method="euclidean", nbproc = 2, diag=FALSE, upper=FALSE)
if(class(x) == "exprSet")
{
library(Biobase)
x <- exprs(x)
x <- Biobase::exprs(x)
}
## account for possible spellings of euclidean
......
\documentclass[twoside,10pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[english,french]{babel}
\usepackage{multicol}
\usepackage{a4wide}
%\usepackage{a5}
%\usepackage{graphics}
\usepackage{fancyhdr}
\usepackage{verbatim}
%\usepackage{hyperref}
\usepackage{lettrine}
%\usepackage{times}
%\usepackage[Glenn]{fncychap}
\usepackage{color}
%\usepackage{draftcopy}
%\usepackage{SFHeaders}
%\usepackage{hieroglf} % hieroglyphes
\usepackage{geometry}
\bibliographystyle{amsplain}
%dvips -T 14.85cm,21cm -o amap_sdd.ps amap_sdd.dvi; psbook amap_sdd.ps tmp.ps ; psnup -2 -pa4 -Pa5 tmp.ps tmpa4.ps; pstops '2:0U(21cm,29.7cm),1' tmpa4.ps amap_sdd.ps
%\geometry{verbose,paperwidth=148.5mm,paperheight=210mm,
% tmargin=15mm,bmargin=15mm ,lmargin=25mm,rmargin=20mm}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.eps}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhead{}
\cfoot{$\thepage$}
\title{\bf Amap Software Design Description \\(SDD)}
%\date{}
\author{Antoine Lucas\thanks{e-mail: antoinelucas@gmail.com}\\[0.2cm]
\normalsize Brest
}
\newcounter{numeroreq}
\newcommand{\req}[1]{\stepcounter{numeroreq} \small{ \em \noindent [BEGIN REQUIREMENT AMAP\_SDD\_\arabic{numeroreq}] }\\ \noindent \rm \normalsize #1 \\ \small{ \em \noindent [END REQUIREMENT] \\ } }
\begin{document}
\maketitle
\sloppy
%% \begin{table}[htb]
%% \centering
%% \begin{tabular}{cc}
%% \hline
%% \bf Name & \bf e-mail \\
%% \hline
%% \hline
%% Antoine Lucas & antoinelucas@gmail.com\\
%% \hline
%% \end{tabular}
%% \caption{Authors}
%% \end{table}
\begin{table}[htb]
\centering
\begin{tabular}{ccc}
\hline
\bf Version & \bf date & \bf Update \\
\hline
\hline
0.1 & 30/09/2007 & Initial revision\\
\hline
\end{tabular}
\caption{Version history}
\end{table}
%\section{Introduction}
%\subsection{Purpose}
\begin{multicols}{2}
\section{Software description}
\subsection{Existent}
Amap is based on some open source code. Kmeans and hierarchical
clustering (with distance matrix computation)
are taken from R-project. An R code implementing robust pca
described in \cite{caussinu+ruiz2} is provided by the article author.
Amap use Fortran code from Michel Petitjean \cite{mpetitjean}.
A summary of evolutions:
\begin{itemize}
\item An evolution of Kmeans is required
in order to satisfy exigence SRS\_3.
\item An evolution of hierarchical clustering is required in order
to satisfy exigence SRS\_4 and SRS\_6.
\item Robust pca must be written in C, C++ or Frotran in order
to satisfy exigence SRS\_5.
\item Interfaces of Fortran code from Michel Petitjean must
be reworked in order to fit with R call.
\end{itemize}
\subsection{Detailed description}
\req{Amap package use a modification of Kmeans function from R-project, to
provide a choice on distance used. Distance primitive function
are common between kmeans, distance (matrix computation) and hierachical
clustering}
\req{Amap package port hclust fortran function and distance C function
from R-project to C++ in order to
\begin{itemize}
\item launch directly distance from an ``hcluster'' call; this will avoid duplication of matrix distance in R in order to satisfy SRS\_6.
\item desalocate memory used by matrix distance after computation
\item use many threads (number of threads will be a parameter sent by R command), in order to satisfy speed aspect of SRS\_6
\item use templates in order to propose same algorithm in simple or double
floating point precision.
\item add new metrics, including pearson and rank based metrics (spearman).
\end{itemize}
~
}
\req{Fortran code from Michel Petitjean is adapted to a use in R}
\req{A new code is developped in C to implement robust pca
described in \cite{caussinu+ruiz2}.}
\section{Validation}
\req{Validation of implementation of k-means, hierarchical clustering and
distance computation are done by two ways:
\begin{itemize}
\item verification that r-project k-means gives same result when using
same metrics.
\item verification for all metrics that it computes the correct result,
with small examples (by hand).
\end{itemize}
Then results are archived to check non regression.
}
\req{Validation of implementation of robust pca is done by comparing
results from C code, and R code given by the author of article. Result
is now archived for non regression tests.}
\req{Validation of implementation of optimal partition will be done
by cheking that amap output and Michel Petitjean software output
are the same.
Result
is now archived for non regression tests.}
\section{Methods, tools and techniques}
\req{C and C++ code will use doxygen inline documentation}
\req{Amap package will be host on a sourceforge-like project
manager\footnote{At address http://mulcyber.toulouse.inra.fr/projects/amap}
i.e. a bug manager, a repository like
CVS and news for all releases or bug correction.}
\req{Amap will be compilant with SRS\_7}
\section{Tracability matrix}
%See Tab. \ref{matrix_srs_sdd}.
%\begin{table}[hbt]
%\label{matrix_srs_sdd}
\centering
\begin{tabular}{ccc}
\hline
\bf SRS & \bf SDD \\
\hline
\hline
SRS\_1 & SDD\_4\\
SRS\_2 & SDD\_3\\
SRS\_3 & SDD\_1\\
SRS\_4 & SDD\_2\\
SRS\_5 & SDD\_1 SDD\_2 SDD\_3 SDD\_4\\
SRS\_6 & SDD\_2\\
SRS\_7 & SDD\_10\\
SRS\_8 & SDD\_5 SDD\_6 SDD\_7\\
SRS\_9 & SDD\_7\\
SRS\_10 & SDD\_5 SDD\_6 SDD\_7\\
\hline
\end{tabular}
%\caption{Tracability matrix}
~\\
Tab.~2: Tracability matrix
%\end{table}
\bibliography{amap}
\end{multicols}
\end{document}
\documentclass[twoside,10pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[english,french]{babel}
\usepackage{multicol}
\usepackage{a4wide}
%\usepackage{a5}
%\usepackage{graphics}
\usepackage{fancyhdr}
\usepackage{verbatim}
%\usepackage{hyperref}
\usepackage{lettrine}
%\usepackage{times}
%\usepackage[Glenn]{fncychap}
\usepackage{color}
%\usepackage{draftcopy}
%\usepackage{SFHeaders}
\bibliographystyle{amsplain}
%\usepackage{hieroglf} % hieroglyphes
%dvips -T 14.85cm,21cm -o amap_srs.ps amap_srs.dvi; psbook amap_srs.ps tmp.ps ; psnup -2 -pa4 -Pa5 tmp.ps tmpa4.ps; pstops '2:0U(21cm,29.7cm),1' tmpa4.ps amap_srs.ps
%psselect -p1 amap_srs.ps |lpr
% on prends la feuille, on la retourne et rement ds le bac intermediaire
%psselect -p2 amap_srs.ps |lpr
%\usepackage{geometry}
%\geometry{verbose,paperwidth=148.5mm,paperheight=210mm,
% tmargin=15mm,bmargin=15mm ,lmargin=25mm,rmargin=20mm}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.eps}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhead{}
\cfoot{$\thepage$}
\title{\bf Amap Software Requirements Specification\\ (SRS)}
%\date{}
\author{Antoine Lucas\thanks{e-mail: antoinelucas@gmail.com}\\[0.2cm]
\normalsize Brest
}
\newcounter{numeroreq}
\newcommand{\req}[1]{\stepcounter{numeroreq} \small{ \em \noindent [BEGIN REQUIREMENT AMAP\_SRS\_\arabic{numeroreq}] }\\ \noindent \rm \normalsize #1 \\ \small{ \em \noindent [END REQUIREMENT] \\ } }
\begin{document}
\maketitle
\sloppy
%% \begin{table}[htb]
%% \centering
%% \begin{tabular}{cc}
%% \hline
%% \bf Name & \bf e-mail \\
%% \hline
%% \hline
%% Antoine Lucas & antoinelucas@gmail.com\\
%% \hline
%% \end{tabular}
%% \caption{Authors}
%% \end{table}
\begin{table}[htb]
\centering
\begin{tabular}{ccc}
\hline
\bf Version & \bf date & \bf Update \\
\hline
\hline
0.1 & 30/09/2007 & Initial revision\\
\hline
\end{tabular}
\caption{Version history}
\end{table}
\begin{multicols}{2}
\section{Introduction}
%\subsection{Purpose}
Aim of amap package is to propose to end users (statistician and bioolgists)
powerfull analysis tools. Statisticians requires many options and new
algorithms as described in \cite{caussinu+ruiz2} whereas biologists
needs very optimised standard algorithms. This package will be based on R
language.
\section{Overall description}
Amap package will be a standard R package, using convention
described in \cite{R:writtingRExt}.
It will provides
\begin{itemize}
\item implementation of new algorithms of robust pca
described in \cite{caussinu+ruiz2},
\item implementation of new algorithm of optimal partition described in
\cite{mpetijean},
\item a k-means algorithm based on a rank-metric,
\item a hierarchical clustering optimised for multi-processor
servers, with the minimum memory allocation.
\item the possibility to use rank based metrics with hierarchical clustering
\end{itemize}
\section{Requirements}
\subsection{Scope}
\req{Amap package must implement algorithms described in \cite{caussinu+ruiz2}.}
\req{Amap package must implement algorithms described in \cite{mpetitjean}.}
\req{Amap package must implement a k-means algorithm based on a rank-metric.}
\req{Amap package must implement a rank based metrics with hierarchical clustering.}
\subsection{Performances}
\req{All algorithm must be coded in fortran, C or C++; R code will
be limited to data manipulation}
\req{Hierarchical clustering must compute a set of 15000 individuals with 200
variables on a dual Xeon 3.2~Ghz in less than
half an hour with less than 1 Go memory used.}
\section{Methods, tools and techniques}
\req{Amap package will be a standard R package, using convention
described in \cite{R:writtingRExt}. All function must have a user
manual}
\section{Qualification}
Amap package will provides a set of unitary tests, in order to check both
exactitude of algorithms, and non regression.\\
\req{All algorithms will be ``proven'' by comparison to another implementation
with some references data tests}
\req{All functions have an example detailed in documentation, that command R CMD check is able to run without error. Output of theses examples will be archived
in order to check non regression.}
\req{An R script will test all functions with the combinaison of
all parameters. Output of this script will be archived in order to check
non regression.}
\bibliography{amap}
\end{multicols}
\end{document}
......@@ -8,7 +8,7 @@
\usage{
acp(x,center=TRUE,reduce=TRUE,wI=rep(1,nrow(x)),wV=rep(1,ncol(x)))
pca(x,center=TRUE,reduce=TRUE,wI=rep(1,nrow(x)),wV=rep(1,ncol(x)))
print.acp(x, ...)
\S3method{print}{acp}(x, ...)
}
......
......@@ -7,9 +7,9 @@
\title{Graphics for Principal component Analysis}
\description{Graphics for Principal component Analysis}
\usage{
plot.acp(x,i=1,j=2,text=TRUE,label='Composants',col='darkblue',
main='Individuals PCA',variables=TRUE,labels=NULL,...)
biplot.acp(x,i=1,j=2,label='Composants',col='darkblue',length=0.1,
\S3method{plot}{acp}(x,i=1,j=2,text=TRUE,label='Composants',col='darkblue',
main='Individuals PCA',variables=TRUE,individual.label=NULL,...)
\S3method{biplot}{acp}(x,i=1,j=2,label='Composants',col='darkblue',length=0.1,
main='Variables PCA',circle=TRUE,...)
plot2(x,pourcent=FALSE,eigen=TRUE,label='Comp.',col='lightgrey',
main='Scree Graph',ylab='Eigen Values')
......@@ -26,7 +26,7 @@ values}
\item{eigen}{a logical value indicating whether we use eigen values or
standard deviation}
\item{label}{label for X and Y axis}
\item{labels}{labels naming individuals}
\item{individual.label}{labels naming individuals}
\item{col}{Color of plot}
\item{main}{Title of graphic}
\item{ylab}{Y label}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment