fastoranalysis


Namefastoranalysis JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/davidq9199/fastoranalyzer
SummaryA performant factor analysis package for python
upload_time2024-08-20 01:49:59
maintainerNone
docs_urlNone
authordavidq9199
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FastorAnalysis

FastorAnalysis is a performant Factor Analysis library for Python, modeled after R's factanal. FastorAnalysis is intended to provide efficient and scalable factor analysis.

## Table of Contents
- [Introduction](#introduction)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Performance Comparisons](#performance-comparisons)
- [Future Directions](#future-directions)
- [License](#license)

## Introduction

FastorAnalysis is built to address the extremely pressing need for a slightly more performant and less featured factor analysis package in Python. The output stability of the R's factanal, the existing factoranalysis, and the emerging fastoranalysis vary somewhat significantly, however, there are parameter and implementation adjustments that can be made to match a given package more closely. 

## Features

- Fast (for python) and memory-efficient factor analysis implementation
- Support for large datasets
- Accessible API, similar to scikit-learn
- Optimized for both speed and memory usage

## Installation

You can install FastorAnalysis using pip:

```
pip install fastoranalysis
```

## Usage

Here's a quick example of how to use FastorAnalysis:

```python
from fastoranalysis import FactorAnalysis
import numpy as np

# Generate sample data
X = np.random.rand(1000, 20)

# Create and fit the model
fa = FactorAnalysis(n_factors=5)
fa.fit(X)

# Get factor loadings
loadings = fa.loadings_

# Transform data
X_transformed = fa.transform(X)
```

For more detailed usage instructions and API documentation, please refer to [documentation](link-to-your-documentation).

## Performance Comparisons

Here are the results comparing the speed and memory performance of fastoranalysis, factoranalysis, and factanal. 

### Execution Time Comparison

![Execution Time Comparison](benchmarks/benchmark_time.png)

### Memory Usage Comparison

![Memory Usage Comparison](benchmarks/benchmark_memory.png)

These benchmarks were conducted on datasets ranging from 1MB to 100MB, comparing FastorAnalysis ('fastor') with FactorAnalyzer ('factor') and R's factanal ('factanal'). The numerical values are available at /benchmarks/benchmark_results.csv. 

As the graphs show, fastoranalyis execution time significantly outperforms factoranalysis unilaterally while being slower than factanal for smaller datasets. As dataset size increases, the difference between the execution times shrinks and fastoranalysis outperforms factanal for the 100MB dataset.

The Python implementations use significantly less memory, with fastor using the least memory across every dataset. The reasonably quick performance of fastoranalysis comes at the cost of less safety and general robustness. 

## Future Directions

1. **Input Flexibility**: R's factanal supports formula interfaces and precomputed covariance matricies. 
2. **Additional Rotation Methods**: Expand the available rotation methods beyond varimax and promax.
3. **Incremental Learning**: Develop an incremental learning approach for datasets that don't fit in memory.
4. **Improved Output Formatting**: Implement more robust formatting and viewing options that are consistent with factanal.
6. **Parallel Processing**: Add parallel processing capabilities for multi-core systems.
7. **GPU Acceleration**: Implement cuda based computations for sufficiently large datasets.


## License

Distributed under the MIT License. See `LICENSE` file for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/davidq9199/fastoranalyzer",
    "name": "fastoranalysis",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "davidq9199",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a4/91/fae8dd66c19227e7aea4e751cd307532fb7bcd8bc5766cc125cc1ab2f5df/fastoranalysis-0.1.0.tar.gz",
    "platform": null,
    "description": "# FastorAnalysis\r\n\r\nFastorAnalysis is a performant Factor Analysis library for Python, modeled after R's factanal. FastorAnalysis is intended to provide efficient and scalable factor analysis.\r\n\r\n## Table of Contents\r\n- [Introduction](#introduction)\r\n- [Features](#features)\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n- [Performance Comparisons](#performance-comparisons)\r\n- [Future Directions](#future-directions)\r\n- [License](#license)\r\n\r\n## Introduction\r\n\r\nFastorAnalysis is built to address the extremely pressing need for a slightly more performant and less featured factor analysis package in Python. The output stability of the R's factanal, the existing factoranalysis, and the emerging fastoranalysis vary somewhat significantly, however, there are parameter and implementation adjustments that can be made to match a given package more closely. \r\n\r\n## Features\r\n\r\n- Fast (for python) and memory-efficient factor analysis implementation\r\n- Support for large datasets\r\n- Accessible API, similar to scikit-learn\r\n- Optimized for both speed and memory usage\r\n\r\n## Installation\r\n\r\nYou can install FastorAnalysis using pip:\r\n\r\n```\r\npip install fastoranalysis\r\n```\r\n\r\n## Usage\r\n\r\nHere's a quick example of how to use FastorAnalysis:\r\n\r\n```python\r\nfrom fastoranalysis import FactorAnalysis\r\nimport numpy as np\r\n\r\n# Generate sample data\r\nX = np.random.rand(1000, 20)\r\n\r\n# Create and fit the model\r\nfa = FactorAnalysis(n_factors=5)\r\nfa.fit(X)\r\n\r\n# Get factor loadings\r\nloadings = fa.loadings_\r\n\r\n# Transform data\r\nX_transformed = fa.transform(X)\r\n```\r\n\r\nFor more detailed usage instructions and API documentation, please refer to [documentation](link-to-your-documentation).\r\n\r\n## Performance Comparisons\r\n\r\nHere are the results comparing the speed and memory performance of fastoranalysis, factoranalysis, and factanal. \r\n\r\n### Execution Time Comparison\r\n\r\n![Execution Time Comparison](benchmarks/benchmark_time.png)\r\n\r\n### Memory Usage Comparison\r\n\r\n![Memory Usage Comparison](benchmarks/benchmark_memory.png)\r\n\r\nThese benchmarks were conducted on datasets ranging from 1MB to 100MB, comparing FastorAnalysis ('fastor') with FactorAnalyzer ('factor') and R's factanal ('factanal'). The numerical values are available at /benchmarks/benchmark_results.csv. \r\n\r\nAs the graphs show, fastoranalyis execution time significantly outperforms factoranalysis unilaterally while being slower than factanal for smaller datasets. As dataset size increases, the difference between the execution times shrinks and fastoranalysis outperforms factanal for the 100MB dataset.\r\n\r\nThe Python implementations use significantly less memory, with fastor using the least memory across every dataset. The reasonably quick performance of fastoranalysis comes at the cost of less safety and general robustness. \r\n\r\n## Future Directions\r\n\r\n1. **Input Flexibility**: R's factanal supports formula interfaces and precomputed covariance matricies. \r\n2. **Additional Rotation Methods**: Expand the available rotation methods beyond varimax and promax.\r\n3. **Incremental Learning**: Develop an incremental learning approach for datasets that don't fit in memory.\r\n4. **Improved Output Formatting**: Implement more robust formatting and viewing options that are consistent with factanal.\r\n6. **Parallel Processing**: Add parallel processing capabilities for multi-core systems.\r\n7. **GPU Acceleration**: Implement cuda based computations for sufficiently large datasets.\r\n\r\n\r\n## License\r\n\r\nDistributed under the MIT License. See `LICENSE` file for more information.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A performant factor analysis package for python",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/davidq9199/fastoranalyzer"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "65c6b8c90ce5fc2eeb48aab617cd73894e0dd9809e99c80a934a2dc46b8b9f88",
                "md5": "b4a4e1b7694ecbacb5137406fab92849",
                "sha256": "4118bfd0bc5ecff49073b4e8954a26966f13348835605e757929d1e6a72e6ba9"
            },
            "downloads": -1,
            "filename": "fastoranalysis-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b4a4e1b7694ecbacb5137406fab92849",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 11794,
            "upload_time": "2024-08-20T01:49:57",
            "upload_time_iso_8601": "2024-08-20T01:49:57.916878Z",
            "url": "https://files.pythonhosted.org/packages/65/c6/b8c90ce5fc2eeb48aab617cd73894e0dd9809e99c80a934a2dc46b8b9f88/fastoranalysis-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a491fae8dd66c19227e7aea4e751cd307532fb7bcd8bc5766cc125cc1ab2f5df",
                "md5": "241b80e225f8e2e6733e39bf92359a18",
                "sha256": "1fde97c119aa922d01387d73cf641c775547e78ea1b2a4aedccfc5bc6dace068"
            },
            "downloads": -1,
            "filename": "fastoranalysis-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "241b80e225f8e2e6733e39bf92359a18",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11203,
            "upload_time": "2024-08-20T01:49:59",
            "upload_time_iso_8601": "2024-08-20T01:49:59.582357Z",
            "url": "https://files.pythonhosted.org/packages/a4/91/fae8dd66c19227e7aea4e751cd307532fb7bcd8bc5766cc125cc1ab2f5df/fastoranalysis-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-20 01:49:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "davidq9199",
    "github_project": "fastoranalyzer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fastoranalysis"
}
        
Elapsed time: 0.55482s