Velocity Reviews

Velocity Reviews (
-   Python (
-   -   Re: ICA - Independent Component Analysis (

Tim Churches 06-27-2003 09:06 PM

Re: ICA - Independent Component Analysis
On Sat, 2003-06-28 at 06:45, John Hunter wrote:
> >>>>> "Tim" == Tim Churches <> writes:

> Tim> There is a fastICA library for R (a free statistical analysis
> Tim> environment) which does ICA and projection pursuit - see
> Tim>
> Tim> If you want to access it from Python, try Walter Moreira's
> Tim> excellent RPy module (see 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
>>> from rpy import *
>>> r.library("fastICA")


Tim C

PGP/GnuPG Key 1024D/EAF993D0 available from keyservers everywhere
or at
Key fingerprint = 8C22 BF76 33BA B3B5 1D5B EB37 7891 46A9 EAF9 93D0

Version: GnuPG v1.0.7 (GNU/Linux)


All times are GMT. The time now is 07:04 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.