pymrmr
Python3 binding to mRMR Feature Selection algorithm (currently not maintained)
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.6%) to scientific vocabulary
Keywords
computational-biology
data-science
feature-selection
gene-expression
mutual-information
Keywords from Contributors
interactive
particle
cryptocurrencies
genomics
serialize
ecosystem-modeling
mesh
interpretability
profiles
distribution
Last synced: 6 months ago
·
JSON representation
Repository
Python3 binding to mRMR Feature Selection algorithm (currently not maintained)
Basic Info
Statistics
- Stars: 141
- Watchers: 1
- Forks: 37
- Open Issues: 40
- Releases: 0
Topics
computational-biology
data-science
feature-selection
gene-expression
mutual-information
Created almost 9 years ago
· Last pushed about 1 year ago
Metadata Files
Readme
Changelog
Contributing
License
Authors
README.rst
===============================
PymRMR
===============================
.. image:: https://img.shields.io/pypi/v/pymrmr.svg
:target: https://pypi.python.org/pypi/pymrmr
.. image:: https://img.shields.io/travis/fbrundu/pymrmr.svg
:target: https://travis-ci.com/fbrundu/pymrmr
.. image:: https://pyup.io/repos/github/fbrundu/pymrmr/shield.svg
:target: https://pyup.io/repos/github/fbrundu/pymrmr/
:alt: Updates
THIS PACKAGE IS CURRENTLY NOT MAINTAINED.
-----------------------------------------
It is available here for reference, but I currently do not have the time to review issues/pull requests.
Original README
---------------
Python3 binding to mRMR Feature Selection algorithm [1]
Original author: Hanchuan Peng (http://home.penglab.com/proj/mRMR/)
[1]: Hanchuan Peng, Fuhui Long, and Chris Ding, "Feature selection based on mutual information: criteria of max-dependency, max-relevance, and min-redundancy," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 27, No. 8, pp.1226-1238, 2005.
The CPP code is subject to the original license (retrieved from http://home.penglab.com/proj/mRMR/FAQ_mrmr.htm):
The mRMR software packages can be downloaded and used, subject to the following conditions: Software and source code Copyright (C) 2000-2007 Written by Hanchuan Peng. These software packages are copyright under the following conditions: Permission to use, copy, and modify the software and their documentation is hereby granted to all academic and not-for-profit institutions without fee, provided that the above copyright notice and this permission notice appear in all copies of the software and related documentation and our publications (TPAMI05, JBCB05, CSB03, etc.) are appropriately cited. Permission to distribute the software or modified or extended versions thereof on a not-for-profit basis is explicitly granted, under the above conditions. However, the right to use this software by companies or other for profit organizations, or in conjunction with for profit activities, and the right to distribute the software or modified or extended versions thereof for profit are NOT granted except by prior arrangement and written consent of the copyright holders. For these purposes, downloads of the source code constitute "use" and downloads of this source code by for profit organizations and/or distribution to for profit institutions in explicitly prohibited without the prior consent of the copyright holders. Use of this source code constitutes an agreement not to criticize, in any way, the code-writing style of the author, including any statements regarding the extent of documentation and comments present. The software is provided "AS-IS" and without warranty of any kind, expressed, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose. In no event shall the authors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever resulting from loss of use, data or profits, whether or not advised of the possibility of damage, and on any theory of liability, arising out of or in connection with the use or performance of these software packages.
The Python wrapper is subject to MIT license.
Installation
------------
.. code-block:: bash
pip install numpy Cython
pip install -U pymrmr
This package needs to be compiled with gcc and g++. On macOS you might need to setup the appropriate environment variables before installation.
E.g., if you installed gcc-10 through HomeBrew you might use the following:
.. code-block:: bash
CC=gcc-10 CXX=g++-10 pip install -U pymrmr
Usage
-----
pymRMR provides the single entry point method :code:`pymrmr.mRMR()`.
Data should be provided already discretised, as defined in the original paper [1]. This version of the algorithm does NOT provide discretisation, differently from the original C code.
This method requires 3 input parameters:
* First parameter is a pandas DataFrame (http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html) containing the input dataset, discretised as defined in the original paper (for ref. see http://home.penglab.com/proj/mRMR/). The rows of the dataset are the different samples. The first column is the classification (target) variable for each sample. The remaining columns are the different variables (features) which may be selected by the algorithm. (see "Sample Data Sets" at http://home.penglab.com/proj/mRMR/ to download sample dataset to test this algorithm). **IMPORTANT**: the column names (feature names) should be of type string;
* Second parameter is a string which defines the internal Feature Selection method to use (defined in the original paper): possible values are "MIQ" or "MID";
* Third parameter is an integer which defines the number of features that should be selected by the algorithm.
The return value is a list containing the names of the selected features.
The following is an example of execution:
.. code-block:: python
In [1]: import pandas as pd
In [2]: import pymrmr
In [3]: df = pd.read_csv('test_colon_s3.csv')
In [4]: pymrmr.mRMR(df, 'MIQ', 10)
*** This program and the respective minimum Redundancy Maximum Relevance (mRMR)
algorithm were developed by Hanchuan Peng for
the paper
"Feature selection based on mutual information: criteria of
max-dependency, max-relevance, and min-redundancy,"
Hanchuan Peng, Fuhui Long, and Chris Ding,
IEEE Transactions on Pattern Analysis and Machine Intelligence,
Vol. 27, No. 8, pp.1226-1238, 2005.
*** MaxRel features ***
Order Fea Name Score
1 765 v765 0.375
2 1423 v1423 0.337
3 513 v513 0.321
4 249 v249 0.309
5 267 v267 0.304
6 245 v245 0.304
7 1582 v1582 0.280
8 897 v897 0.269
9 1771 v1771 0.269
10 1772 v1772 0.269
*** mRMR features ***
Order Fea Name Score
1 765 v765 0.375
2 1123 v1123 24.913
3 1772 v1772 3.984
4 286 v286 2.280
5 467 v467 1.979
6 377 v377 1.768
7 513 v513 1.803
8 1325 v1325 1.634
9 1972 v1972 1.741
10 1412 v1412 1.689
Out[4]:
['v765',
'v1123',
'v1772',
'v286',
'v467',
'v377',
'v513',
'v1325',
'v1972',
'v1412']
Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
Owner
- Name: Francesco G. Brundu
- Login: fbrundu
- Kind: user
- Location: San Diego, CA
- Repositories: 29
- Profile: https://github.com/fbrundu
GitHub Events
Total
- Watch event: 5
- Delete event: 17
- Issue comment event: 17
- Push event: 18
- Pull request event: 34
- Create event: 18
Last Year
- Watch event: 5
- Delete event: 17
- Issue comment event: 17
- Push event: 18
- Pull request event: 34
- Create event: 18
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| pyup-bot | g****t@p****o | 88 |
| Francesco G. Brundu | f****u@g****m | 33 |
| dependabot[bot] | 4****] | 2 |
| Maximilian Nöthe | m****e@t****e | 1 |
Committer Domains (Top 20 + Academic)
tu-dortmund.de: 1
pyup.io: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 5
- Total pull requests: 259
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Total issue authors: 5
- Total pull request authors: 3
- Average comments per issue: 5.0
- Average comments per pull request: 0.95
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 0
- Pull requests: 64
- Average time to close issues: N/A
- Average time to close pull requests: 19 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.83
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- lewisscola (1)
- dasssayantan18 (1)
- Kein0112 (1)
- Melodddy (1)
- pyup-bot (1)
- jayneeee (1)
Pull Request Authors
- pyup-bot (347)
- noobyogi0010 (1)
- dependabot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (1)
Packages
- Total packages: 1
-
Total downloads:
- pypi 1,282 last-month
- Total dependent packages: 1
- Total dependent repositories: 5
- Total versions: 10
- Total maintainers: 1
pypi.org: pymrmr
Python3 binding to mRMR Feature Selection algorithm
- Homepage: https://github.com/fbrundu/pymrmr
- Documentation: https://pymrmr.readthedocs.io/
- License: MIT license
-
Latest release: 0.1.11
published about 5 years ago
Rankings
Docker downloads count: 4.3%
Dependent packages count: 4.7%
Downloads: 5.6%
Average: 5.7%
Stargazers count: 6.2%
Forks count: 6.6%
Dependent repos count: 6.6%
Maintainers (1)
Last synced:
6 months ago
Dependencies
requirements_dev.txt
pypi
- Cython ==0.29.21 development
- Sphinx ==3.4.3 development
- bumpversion ==0.6.0 development
- coverage ==5.4 development
- cryptography ==3.3.2 development
- flake8 ==3.8.4 development
- numpy ==1.19.5 development
- pandas >=1.1.5 development
- pip ==21.0.1 development
- pyyaml ==5.4.1 development
- tox ==3.21.4 development
- watchdog ==1.0.2 development
- wheel ==0.36.2 development
setup.py
pypi