Code Monkey home page Code Monkey logo

fanalysis's Introduction

fanalysis

fanalysis is a Python module for Factorial Analysis distributed under the 3-Clause BSD license.

With this fanalysis package, you can perform:

  • Simple Correspondence Analysis
  • Multiple Correspondence Analysis
  • Principal Components Analysis

Those statistical methods can be used in two ways:

  • as descriptive methods ("datamining approach")
  • as reduction methods in scikit-learn pipelines ("machine learning approach")

Installation

Dependencies

fanalysis requires:

Python 3
NumPy >= 1.11.0
Matplotlib >= 2.0.0
Scikit-learn >= 0.18.0
Pandas >= 0.19.0

User installation

You can install fanalysis using pip:

pip install fanalysis

Running the tests

After installation, you can launch the test suite from outside the source directory:

python -m unittest

The philosophy of the unit tests consists in comparing the outputs of fanalysis (with various combinations of parameters) with the outputs of the R FactoMineR package.

Documentation

The docstring is written in english.

Tutorials are available in french:

https://github.com/OlivierGarciaDev/fanalysis/blob/master/doc/ca_tutorial.ipynb
https://github.com/OlivierGarciaDev/fanalysis/blob/master/doc/mca_tutorial.ipynb
https://github.com/OlivierGarciaDev/fanalysis/blob/master/doc/pca_tutorial.ipynb

Author

Olivier Garcia ([email protected])

fanalysis's People

Contributors

ogarciabr avatar oliviergarciadev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fanalysis's Issues

`.as_matrix()` removed from pandas now is `.values()`

Hi,

It looks like as_matrix() has been deprecated since pandas 0.23 and finally been removed.

Would you be open to a pull request that update the code, and if so will you publish an updated version on PyPI ?

Thanks.

row and col projection

I"m converting a R code that use decorana to Python,
and found fanalysis as alternative to decorana with (ira=1).
Results from R, for the 4 eigen values are same.
But, I did not found how to get Row and Col projections. ??

For example,
in R decorana we coud use:

library("vegan")
X <-read.table("example.tsv", header=TRUE, sep='\t')
ca_ra <- decorana(X, ira=1)
# show col projection
ca_ra$cproj
         RA1        RA2         RA3          RA4
A  1.93003452 -3.4006348 -0.41834170  5.741832353
B  1.93004285 -3.4006350 -0.41834167  5.741832392
C  0.03164434  0.4015328  3.19055179  0.051847893
D  0.60775895 -0.8324331 -0.30835257  0.040141236

where A,B,C,D is columns names.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.