Git Product home page Git Product logo

neurocombat_sklearn's Introduction

NeuroCombat-sklearn

License: MIT Version PythonVersion

Implementation of Combat harmonization method in scikit-learn compatible format.

The Combat harmonization/normalization method uses an parametric empirical Bayes framework to robustly adjust data for site/batch effects. The scikit-learn compatible format was used to facilitates the use of this harmonization method in machine learning projects.

This repository is developed by Walter Hugo Lopez Pinaya at King's College London and community contributors.

Installation

Requirements

User installation

If you already have a working installation of numpy and scipy, the easiest way to install neurocombat-sklearn is using pip :

pip install neurocombat-sklearn

Citation

If you find this code useful for your research, please cite:

@article{fortin2018harmonization,
  title={Harmonization of cortical thickness measurements across scanners and sites},
  author={Fortin, Jean-Philippe and Cullen, Nicholas and Sheline, Yvette I and Taylor, Warren D and Aselcioglu, Irem and Cook, Philip A and Adams, Phil and Cooper, Crystal and Fava, Maurizio and McGrath, Patrick J and others},
  journal={Neuroimage},
  volume={167},
  pages={104--120},
  year={2018},
  publisher={Elsevier}
}

@article{johnson2007adjusting,
  title={Adjusting batch effects in microarray expression data using empirical Bayes methods},
  author={Johnson, W Evan and Li, Cheng and Rabinovic, Ariel},
  journal={Biostatistics},
  volume={8},
  number={1},
  pages={118--127},
  year={2007},
  publisher={Oxford University Press}
}

Disclaimer

Based on:

neurocombat_sklearn's People

Contributors

warvito avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

neurocombat_sklearn's Issues

Dividing by zeros when transforming data

Hi,

Thanks for this code,

When I call fit or transform function, I have some problems : Line 258 of neurocombat_sklearn.py file, it divides using the following term : np.dot(np.sqrt(self.var_pooled), np.ones((1, n_sample))). In this term, almost half of the coefficients are zeros so I got a RuntimeWarning (invalid value encountered in true_divide) and Nan values create problems later. I have this problem with different datasets (except the example you give), have you any idea why I got zeros and how I can fix this bug ? Can it be due to the input range value ?

Thanks

Transform test data

Hi,

If I understood correctly, we pass our target variables as argument of the fit method (discrete_covariates or continuous_covariates). But it seems that we also have to give this variables for the transform method. But it's not correct to give variables to transform that we want to predict, no ?

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.