Re: ICA - Independent Component Analysis

Discussion in 'Python' started by Tim Churches, Jun 27, 2003.

  1. Tim Churches

    Tim Churches Guest

    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> 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



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

    iD8DBQA+/LHMeJFGqer5k9ARApYKAKCtBtQTjgF9oTMZ+Fk0Sf24bZ8xLACcC7Nf
    MFQAlOJCVKmlSqTHvLTCiZs=
    =OyAK
    -----END PGP SIGNATURE-----
     
    Tim Churches, Jun 27, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Axel Kowald
    Replies:
    4
    Views:
    957
    Tak-Shing Chan
    Dec 7, 2003
  2. Axel Kowald

    source code for independent component analysis ??

    Axel Kowald, Dec 6, 2003, in forum: C Programming
    Replies:
    4
    Views:
    604
    Tak-Shing Chan
    Dec 7, 2003
  3. John Hunter

    ICA - Independent Component Analysis

    John Hunter, Jun 27, 2003, in forum: Python
    Replies:
    0
    Views:
    1,372
    John Hunter
    Jun 27, 2003
  4. Tim Churches

    Re: ICA - Independent Component Analysis

    Tim Churches, Jun 27, 2003, in forum: Python
    Replies:
    0
    Views:
    768
    Tim Churches
    Jun 27, 2003
  5. John Hunter
    Replies:
    0
    Views:
    724
    John Hunter
    Jun 27, 2003
Loading...

Share This Page