https://github.com/bhklab/pymrmre

https://github.com/bhklab/pymrmre

Science Score: 26.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
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: bhklab
  • License: mit
  • Language: C++
  • Default Branch: master
  • Size: 18.2 MB
Statistics
  • Stars: 11
  • Watchers: 1
  • Forks: 3
  • Open Issues: 7
  • Releases: 0
Created about 7 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

PymRMRe

Description

Feature selection is one of the main challenges in analyzing high-throughput genomic data. Minimum redundancy maximum relevance (mRMR) is a particularly fast feature selection method for finding a set of both relevant and complementary features. The Pymrmre package, extend the mRMR technique by using an ensemble approach to better explore the feature space and build more robust predictors. To deal with the computational complexity of the ensemble approach, the main functions of the package are implemented and parallelized in C++ using openMP Application Programming Interface. The package also supports making best selections with some fixed-selected features.

Prerequisite

Python(>=3.6.0)
Cython(>=0.29.12)
numpy(>=1.16.4)
pandas(>=0.25.0)

Installation

pip install Pymrmre

Insturctions

Two primary functions are provided in this package currently:

  • mrmr_ensemble: It provides the ensemble (multiple) solutions of feature selection given the input of feature dataset and target column, it supports the feature selection with preselection as well.

    • :param features: Pandas dataframe, the input dataset
    • :param targets: Pandas dataframe, the target features
    • :param fixed_features: List, the list of fixed features (column names), the default is empty list
    • :param category_features: List, the list of features whose types are categorical (column names), the default is empty list
    • :param solution_length: Integer, the number of features contained in one solution
    • :param solution_count: Integer, the number of solutions to be returned, the default is 1
    • :param estimator: String, the way of computing continuous estimators, the default is Pearson
    • :param return_index: Boolean, to determine whether the solution contains the indices or column names of selected features, the default is False
    • :param returnwithfixed: Boolean, to determine whether the solution contains the fixed selected features, the default is True
    • :return: Pandas series, the solutions of selected features
  • mrmrensemblesurvival: It provides the ensemble (multiple) solutions of feature selection given the input of feature dataset and target column, it supports the feature selection with preselection as well.

    • :param features: Pandas dataframe, the input dataset
    • :param targets: Pandas dataframe, the target features, it must have two columns (event and time of survival data)
    • :param fixed_features: List, the list of fixed features (column names), the default is empty list
    • :param category_features: List, the list of features whose types are categorical (column names), the default is empty list
    • :param solution_length: Integer, the number of features contained in one solution
    • :param solution_count: Integer, the number of solutions to be returned, the default is 1
    • :param estimator: String, the way of computing continuous estimators, the default is Pearson
    • :param return_index: Boolean, to determine whether the solution contains the indices or column names of selected features, the default is False
    • :param returnwithfixed: Boolean, to determine whether the solution contains the fixed selected features, the default is True
    • :return: Pandas series, the solutions of selected features

Example code:

import pandas as pd
from pymrmre import mrmr

Load the input data and target variable, suppose for input X we have ten features (f1, f2, ..., f10):

X = pd.read_csv('train_x.csv')
Y = pd.read_csv('train_y.csv')

Suppose we want to generate 3 solutions, where each solution has 5 features. We want to see f1 exists in all solutions (preselection), and we know that f4 and f5 are categorical variables as well, the code should be like this:

solutions = mrmr.mrmr_ensemble(features=X,targets=Y,fixed_features=['f1'],category_features=['f4','f5'],solution_length=5,solution_count=3)

Because the solution we generated is of the type Pandas series, which has the target variable name as column header. To access the contents of all three solutions, the code is like this:

solutions.iloc[0]

To access one of the solutions, the code is like this (i is 0 - 2 here since we generate 3 solutions here):

solutions.iloc[0][i]

Owner

  • Name: BHKLAB
  • Login: bhklab
  • Kind: organization
  • Location: Toronto, Ontario, Canada

The Haibe-Kains Laboratory @ Princess Margaret Cancer Centre

GitHub Events

Total
  • Issues event: 1
  • Issue comment event: 4
  • Push event: 1
  • Pull request event: 1
Last Year
  • Issues event: 1
  • Issue comment event: 4
  • Push event: 1
  • Pull request event: 1

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 167
  • Total Committers: 7
  • Avg Commits per committer: 23.857
  • Development Distribution Score (DDS): 0.503
Top Committers
Name Email Commits
clareli9 l****2@g****m 83
ChristopherEeles c****s@o****m 54
Christopher Eeles 4****s@u****m 25
Bo Li b****i@A****l 2
gangeshberiuhn 4****n@u****m 1
Bo Li b****i@H****l 1
Bob Ganoosh h****e@B****l 1

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 12
  • Total pull requests: 3
  • Average time to close issues: 16 days
  • Average time to close pull requests: 8 minutes
  • Total issue authors: 9
  • Total pull request authors: 3
  • Average comments per issue: 2.08
  • Average comments per pull request: 1.33
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 3.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • strixy16 (2)
  • jpeoples (2)
  • sheng-di (2)
  • gorogm (1)
  • blankFY (1)
  • zzs1852 (1)
  • ErikEnsminger (1)
  • gvpraagh (1)
  • moonj94 (1)
Pull Request Authors
  • jpeoples (2)
  • ChristopherEeles (1)
  • yassinmelsir (1)
Top Labels
Issue Labels
documentation (1) bug (1) enhancement (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 242 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 2
  • Total versions: 10
  • Total maintainers: 1
pypi.org: pymrmre

A Python package for Parallelized Minimum Redundancy, Maximum Relevance (mRMR) Ensemble Feature selections.

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 2
  • Downloads: 242 Last month
Rankings
Dependent packages count: 10.1%
Downloads: 10.6%
Dependent repos count: 11.6%
Average: 13.8%
Stargazers count: 17.8%
Forks count: 19.2%
Maintainers (1)
Last synced: 11 months ago

Dependencies

.github/workflows/pythonpackage.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
setup.py pypi