{ "info": { "author": "Darya Chyzhyk", "author_email": "darya.chyzhyk@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering" ], "description": "# Confound Prediction\n\n## Confound_prediction is a Python module to control confound effect in the prediction or classification model.\n\nAny successful prediction model may be driven by a confounding effect that is correlated with the effect of interest. It is important to control that detected associations are not driven by unwanted effects. It is common issue in in neuroscience, epidemiology, economy, agriculture, etc. \n\nThis module provides 3 methods to tackle confounding effects in predictive models:\n\n  1. Confound-isolating cross-validation\n\n  2. Out-of-sample deconfounding\n\n  3. Deconfounding test and train jointly (which should not be used, and is provided only for illustration)\n\n### Confound-isolating cross-validation\n\n\u201cConfound-isolating cross-validation\u201d is a non-parametric approach to control for a confounding effect in a predictive model. It is based on crafting a test set on which the effect of interest is independent from the confounding effect. \n\n\n### What expect from Confound_prediction?\n\nDeveloped framework is based on anti mutual information sampling, a novel sampling approach to create a test set in which the effect of interest is independent from the confounding effect. The grafical illustration of classic and confound-isolating cross-validation:\n\n### How does it work?\n\n**You provide us**\n\nVariables:\n \n* *X* - data with shape (n_samples, n_features)\n* *y* - target vector with shape (n_samples)\n* *z* - confound vector with shape (n_samples)\n\nOptional parameters\n* *min_sample_size* - minimum sample size to be reached, default is 10% of the data\n* *n_remove* - number of the samples to be removed on each iteration of sampling, default is 4\n* *prng* - control the pseudo random number generator, default is None\n* *cv_folds* - number of folders in the cross validation, default is 10\n\n**We return you**\n\nVariables:\n* *x_test, x_train, y_test, y_train, ids_test, ids_train* - train and test of *X*, *y* and *sampled indexes*\n\n\n## Installing\n\n### Dependences\nconfound_prediction package requires:\n* Python (>= 3.5)\n* Scipy (>=1.1.0)\n* Scikit-learn (>=0.21.2)\n* Numpy (>=1.14.2)\n* Pytest(>=5.1.1)\n\n### Optional dependency:\n* Matplotlib (>=2.2.2) for example visualization\n* Seaborn (>=0.8) for example visualization\n\n### User installation\n```python\npip install TBD\n```\n\n## Examples\n\n### Example: create train set and test set without confounding effect\n\n```python\npython example/Example_get_testset.py\n```\n\n### Example: compare prediction on data sampled with different deconfounding methods on the data with direct link between target and confound\n\n```python\npython example/Example-prediction-different-deconfounding-direct-confound.py\n```\n\n### Example: compare prediction on the data with different confound effect\n\n```python\npython example/Example-prediction-isolatingcv-deconfounding-dif-confound.py\n```\n\n### Example: evolution of mutual information and correlation on each itteration of 'confound-isolation cross-validation' method\n\n```python\npython example/Example_compare_mutual_info_correlation.py\n```\n\n## References\n\n[1] TBD\n\n[2] D. Chyzhyk, G. Varoquaux, B. Thirion and M. Milham, \"Controlling a confound in predictive models with a test set minimizing its effect,\" 2018 International Workshop on Pattern Recognition in Neuroimaging (PRNI), Singapore, 2018, pp. 1-4.\ndoi: 10.1109/PRNI.2018.8423961 [PDF](https://hal.archives-ouvertes.fr/hal-01831701/document)\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/darya-chyzhyk/confound_prediction", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "confound-prediction", "package_url": "https://pypi.org/project/confound-prediction/", "platform": "any", "project_url": "https://pypi.org/project/confound-prediction/", "project_urls": { "Homepage": "https://github.com/darya-chyzhyk/confound_prediction" }, "release_url": "https://pypi.org/project/confound-prediction/0.0.1a1/", "requires_dist": [ "scipy (>=1.1.0)", "scikit-learn (>=0.21.2)", "numpy (>=1.14.2)" ], "requires_python": "", "summary": "Confound-isolating cross-validation approach to control for a confounding effect in a predictive model.", "version": "0.0.1a1" }, "last_serial": 5765609, "releases": { "0.0.1a0": [ { "comment_text": "", "digests": { "md5": "0e72eca3ff81a265528e6ae49010a8b3", "sha256": "8ec7820b40045e2d4b934e7fda41ecab4a36b152772c242089dee9db5db814c6" }, "downloads": -1, "filename": "confound_prediction-0.0.1a0-py3-none-any.whl", "has_sig": false, "md5_digest": "0e72eca3ff81a265528e6ae49010a8b3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19736, "upload_time": "2019-08-31T23:50:22", "url": "https://files.pythonhosted.org/packages/77/7f/15ac9f621e77c89ffe0732a537713272f64920dcb21d651974165470ac83/confound_prediction-0.0.1a0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a9b90cb9a39514abb879d30761b5d85", "sha256": "6b3e82a7d3fdd1622eaebb76882a44e96413f3cd0ec876713521443c94c6ee28" }, "downloads": -1, "filename": "confound_prediction-0.0.1a0.tar.gz", "has_sig": false, "md5_digest": "8a9b90cb9a39514abb879d30761b5d85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17489, "upload_time": "2019-08-31T23:50:24", "url": "https://files.pythonhosted.org/packages/d8/65/f12a664984261cbc46055332ae5847b56d5d28a6c05a5e5264c9ae744849/confound_prediction-0.0.1a0.tar.gz" } ], "0.0.1a1": [ { "comment_text": "", "digests": { "md5": "e3f6809fa3c1283714fbf988e3f62d3d", "sha256": "bf310e40c0331f3d7dd043ab8470c2b10bfa8e10fcffb9d88baf973530aea1fd" }, "downloads": -1, "filename": "confound_prediction-0.0.1a1-py3-none-any.whl", "has_sig": false, "md5_digest": "e3f6809fa3c1283714fbf988e3f62d3d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19723, "upload_time": "2019-08-31T23:49:00", "url": "https://files.pythonhosted.org/packages/76/62/1837bd470570d0555a1a6489930402270cc4c415a19b52c34a3389189d14/confound_prediction-0.0.1a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "144d1c598874a3f0d02660898807167c", "sha256": "c320e31d8492020d42af29b1f7f82394d1cbd75c4f7099d402ff01a6528ec392" }, "downloads": -1, "filename": "confound_prediction-0.0.1a1.tar.gz", "has_sig": false, "md5_digest": "144d1c598874a3f0d02660898807167c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21900, "upload_time": "2019-08-31T23:49:02", "url": "https://files.pythonhosted.org/packages/91/dd/7461f64486575273579aae80a5963204c3a1bd2db903eeca21f33a9d167c/confound_prediction-0.0.1a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e3f6809fa3c1283714fbf988e3f62d3d", "sha256": "bf310e40c0331f3d7dd043ab8470c2b10bfa8e10fcffb9d88baf973530aea1fd" }, "downloads": -1, "filename": "confound_prediction-0.0.1a1-py3-none-any.whl", "has_sig": false, "md5_digest": "e3f6809fa3c1283714fbf988e3f62d3d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19723, "upload_time": "2019-08-31T23:49:00", "url": "https://files.pythonhosted.org/packages/76/62/1837bd470570d0555a1a6489930402270cc4c415a19b52c34a3389189d14/confound_prediction-0.0.1a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "144d1c598874a3f0d02660898807167c", "sha256": "c320e31d8492020d42af29b1f7f82394d1cbd75c4f7099d402ff01a6528ec392" }, "downloads": -1, "filename": "confound_prediction-0.0.1a1.tar.gz", "has_sig": false, "md5_digest": "144d1c598874a3f0d02660898807167c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21900, "upload_time": "2019-08-31T23:49:02", "url": "https://files.pythonhosted.org/packages/91/dd/7461f64486575273579aae80a5963204c3a1bd2db903eeca21f33a9d167c/confound_prediction-0.0.1a1.tar.gz" } ] }