Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

SLSR-Forest

This repository contains the Python implementation of SLSR-Forest from the paper:

"SLSR-Forest: an imbalance-aware deep forest framework for multiclass synthetic lethality and rescue prediction"

Note: This paper has been submitted to Briefings in Bioinformatics (BIB) and is currently under review. It has not been formally accepted yet.

Requirements

The Python environment and versions of dependency packages used in this implementation are as follows:

Python==3.7.16
scikit-learn==1.0.2
imbalanced-learn==0.10.1
numpy==1.21.6

Usage

We provide a demo for SLSR-Forest in the test.py file, using the Meljuso cell line dataset (325 samples, 3 classes) stored in the datasets/ directory as NumPy arrays. The demo performs a single 4:1 train-test split and evaluates the model using Macro-F1, MCC, and Macro-AUPR.

To run the demo:

python test.py

If you wish to use your own dataset, preprocess it into NumPy arrays (X.npy and y.npy) and place them in the datasets/ directory. Update the datasets list in test.py accordingly. The label y should contain integer class labels (0: SL, 1: SR, 2: Other).

Repository Structure

SLSR-Forest/
├── datasets/                        # Demo datasets (NumPy format)
│   ├── Meljuso_X.npy
│   └── Meljuso_y.npy
├── slsr_forest.py                   # SLSR-Forest model implementation
├── cascade_layer.py                 # Cascade layer module
├── k_fold_wrapper.py                # K-fold cross-validation wrapper with SVD-proxy SMOTE
├── progressive_feature_selector.py  # Progressive feature selection module
├── evaluation.py                    # Evaluation metrics
├── logger.py                        # Logging utility
├── myimblearn/                      # Custom imbalanced learning package (SVD-proxy SMOTE)
└── test.py                          # Demo script

Hyperparameter Settings

The table below shows the mapping between variables in test.py / source code and the hyperparameters of SLSR-Forest. You can modify these variables to configure the hyperparameters. The settings in test.py represent the default hyperparameter values for SLSR-Forest.

Variables Hyperparameters Values
config["max_layers"] Maximum Cascade Depth ($L$) 100
config["early_stop_rounds"] Early Stopping Patience ($T$) 1
config["n_fold"] Number of Cross-Validation Folds 5
configs_RF Random Forest Base Classifier Config n_estimators=50, max_depth=None
configs_BRF Balanced Random Forest Base Classifier Config n_estimators=50, max_depth=None
alpha (in k_fold_wrapper.py) Oversampling Ratio ($\alpha$) 1.1
n_components (in slsr_forest.py) SVD Proxy Dimensions ($d'$) 100
r search space (in slsr_forest.py) Feature Retention Ratio Candidates {1.0, 0.8, 0.6, 0.4, 0.2}

The model uses 4 base classifiers per layer: 2 RandomForestClassifiers and 2 BalancedRandomForestClassifiers. The RandomForest classifiers handle general classification, while the BalancedRandomForest classifiers incorporate tree-level undersampling for class balancing.

Cite This Repository

If you use this code in your research, please cite both the original paper and this code repository:

Paper Citation (BibTeX):


Code Repository:

@software{SLSRForest_Code,
  author = {Zhikai Lin},
  title = {SLSR-Forest},
  year = {2025},
  publisher = {GitHub},
  howpublished = {\url{https://github.com/MLDMXM2017/SLSR-Forest.git}}
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages