ICA - Independent Component Analysis

Tim Churches tchur at optushome.com.au
Fri Jun 27 23:06:20 CEST 2003


On Sat, 2003-06-28 at 06:45, John Hunter wrote:
> >>>>> "Tim" == Tim Churches <tchur at optushome.com.au> writes:
> 
>     Tim> There is a fastICA library for R (a free statistical analysis
>     Tim> environment) which does ICA and projection pursuit - see
>     Tim> http://cran.r-project.org/src/contrib/PACKAGES.html#fastICA
> 
>     Tim> If you want to access it from Python, try Walter Moreira's
>     Tim> excellent RPy module (see http://rpy.sf.net) which embeds R
>     Tim> within your Python interpreter and provides an incredibly
>     Tim> smooth interface between the two (including the ability to
>     Tim> directly pass NumPy arrays to and from R).  --
> 
> 
> Great -- that looks perfect.  I am confused about one thing.  It
> appears that fastica is an extension module that is not part of the
> src I downloaded.  If I install the extension, will I have to modify
> rpy to use it from python, or is there some procedure so that this
> will happen automagically?

No, you need to explicitly load extension libraries into your R session.
Assuming you are on a Posix platform:
1) Build and install a recent Python and NumPy release
2) As per the RPy instructions, build and install R with the
--enable-R-shlib option
3) Obtain and install the fastICA library for R (see the extensive R
documentation - R has the slickest fetch and installation procedures for
extensions in the business)
4) Build and install RPy (make sure you apply the patches first)
5) Within your Python code, load R and then the required extension
libraries:
>>> from rpy import * 
>>> r.library("fastICA")

-- 

Tim C

PGP/GnuPG Key 1024D/EAF993D0 available from keyservers everywhere
or at http://members.optushome.com.au/tchur/pubkey.asc
Key fingerprint = 8C22 BF76 33BA B3B5 1D5B  EB37 7891 46A9 EAF9 93D0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-list/attachments/20030628/910bd951/attachment.pgp>


More information about the Python-list mailing list