Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: ICA - Independent Component Analysis (http://www.velocityreviews.com/forums/t318944-re-ica-independent-component-analysis.html)

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 <tchur@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/contri...S.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



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA+/LHMeJFGqer5k9ARApYKAKCtBtQTjgF9oTMZ+Fk0Sf24bZ8xLAC cC7Nf
MFQAlOJCVKmlSqTHvLTCiZs=
=OyAK
-----END PGP SIGNATURE-----



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.