great thanks to all :)
PDL is a magic thing :)

but I have searched for practical function like mean, cov, ...
I've foud reduce('avg', 1) to produce the colMean.

What I search now is a scaling function... I have a matrix whith vectors in
rows, and I want to center them before using SVD decomposition... I read the
PDL::Transfom and find map but I'm not sure this is what I need...

can you help me?

Laurent.

On 19/12/06, zowie <[EMAIL PROTECTED]> wrote:

PDL is of course in progress, but it is somewhat mature by now, being
over 10 years old... :-)

PDL::Matrix is a "convenience" interface to PDL itself -- all it does
is invert the row/column order.  PDLs are normally stored in
(column,row) order following computational convention rather than
(row,column) as mathematicians prefer.  Rather than decipher which
methods have been subclassed and which have not, I always use PDLs
themselves -- that way at least the (column,row)
order is consistent.

Then you can use dims() rather than mdims().

Inner product of two PDLS $a and $b is
        ($a * $b)->sumover
if you want to collapse columns, or
        ($a * $b)->mv(1,0)->sumover
if you want to collapse rows.

There is an introductory book ion the PDL language that has some
tricks and such in it.  You can download it from Sourceforge -- it is
in a separate cvs repository.

As for getting your matrices back out of PDLS: are you trying to
export them to a file [ try rcols() or rfits() ]?  Or to another Perl
application [ try list() ]?  Or perhaps to a C module that called PDL
via the perlapi?  There are many I/O techniques, depending on what
you want to do.

Cheers,
Craig




On Dec 19, 2006, at 8:39 AM, laurent exsteens wrote:

> hello,
>
> I'm a little confuse with PDL::Matrix...
>
> Is the code in "Work in Progress"? I see in the PDL manpages (on
> the web site) that not all the operators are redefined...
>
> Here is my problem: I have to use SVD to compress a quite huge
> matrix (~5000 columns), so I'm using SVD on R, but I want to
> implement this in my perl interface. What I want is to pass my
> matrix and get back another matrix (not a piddle) but:
>
> I do not understand how the matrix is saved: by columns (I suppose)
> or by lines, still mdims seems to not work... ("" print
> $datasAdjust->mdims() "" don't write anything on the terminal...)
>
> I don't know how to scale the matrix (centering is sufficiant, no
> need to realy scale)
>
> I don't know how to make an inner product (The manpages say that
> they is not yet...)
>
> I don't know how to manipulate the matrix by hand or to get the
> informations back to my own format (not a piddle)
>
>
>
>
> So, is this package usable, or I have to find another way (perhaps
> use the GSL library whith binding from perl...?)
> If it is usable, where can I get some tutorial or documentation
> other than the manpages that give me the tricks I need?
>
> regards,
>
> Laurent.
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to