Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MIDA, CoIRLS, distribution plot, and brain example #246

Merged
merged 55 commits into from Aug 1, 2022

Conversation

shuo-zhou
Copy link
Member

@shuo-zhou shuo-zhou commented Oct 21, 2021

Fixes #173.

Description

  • An example for multi-site brain fMRI classification.
  • A toy example of domain adaptation.
  • PyTorch version>=1.10.0
  • Refactor: kale.embed.mpca -> kale.embed.factorization
  • New features:
    • kale.embde.factorization.MIDA
    • kale.interpret.visualize.distplot_1d
    • kale.pipeline.multi_domain_adapter.CoIRLS

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • In-line docstrings updated.
  • Source for documentation at docs manually updated for new API.

@shuo-zhou shuo-zhou marked this pull request as draft October 21, 2021 12:45
@shuo-zhou shuo-zhou added the work-in-progress Work in progress that should NOT be merged label Nov 20, 2021
@haipinglu
Copy link
Member

@sz144 I hope to work with you to resolve and merge this PR after merging #284. Share the issues remaining with the team today.

@@ -0,0 +1,39 @@
"""
Default configurations for cardiac MRI data (ShefPAH) processing and classification
Copy link
Member

@haipinglu haipinglu Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked your code/comment? Are you sure this config is about cardiac? The filename says autism.

# -----------------------------------------------------------------------------
_C.DATASET = CN()
_C.DATASET.ROOT = "../data"
_C.DATASET.PIPELINE = "cpac"
Copy link
Member

@haipinglu haipinglu Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reference to help users to read further? Particularly, available options.

_C.DATASET = CN()
_C.DATASET.ROOT = "../data"
_C.DATASET.PIPELINE = "cpac"
_C.DATASET.ATLAS = "rois_cc200"
Copy link
Member

@haipinglu haipinglu Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reference (as a comment)?
Possible to provide (as a comment) available options?

from kale.pipeline.multi_domain_adapter import _CoIRLS


def plot_scores_dist(ys_score, yt_score, title=None):
Copy link
Member

@haipinglu haipinglu Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this reusable for problems of the same nature? If yes, then it should go to core API, e.g. visualization.

- [4. Alternate Video Frame Sampling Methods](#4-alternate-video-frame-sampling-methods)
- [5. Using VideoFrameDataset for training](#5-using-videoframedataset-for-training)
- [6. Allowing Multiple Labels per Sample](#6-allowing-multiple-labels-per-sample)
- [5. Conclusion](#5-conclusion)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change this and with two 5s and 6s?

Haiping Lu, K.N. Plataniotis, and A.N. Venetsanopoulos, "MPCA: Multilinear Principal Component Analysis of Tensor
Objects", IEEE Transactions on Neural Networks, Vol. 19, No. 1, Page: 18-39, January 2008. For initial Matlab
implementation, please go to https://uk.mathworks.com/matlabcentral/fileexchange/26168.
"""Python implementation of tensor decomposition approach Multilinear Principal Component Analysis (MPCA)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said, factorization should be better than decomposition.
Also, have you updated the docs?

@shuo-zhou shuo-zhou added new feature New feature/module (including request) and removed work-in-progress Work in progress that should NOT be merged labels Jul 28, 2022
@shuo-zhou shuo-zhou requested a review from haipinglu July 31, 2022 18:54
setup.cfg Outdated Show resolved Hide resolved
Copy link
Member

@haipinglu haipinglu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job.
Only some minor issues remain to be fixed (see comments). Once done, it can be merged. Many thanks.

@haipinglu haipinglu changed the title Brain example Add brain example Aug 1, 2022
@haipinglu haipinglu changed the title Add brain example Add MIDA, CoIRLS, distribution plot, and brain example Aug 1, 2022
@haipinglu haipinglu merged commit 7342dd3 into pykale:main Aug 1, 2022
@shuo-zhou shuo-zhou deleted the brain-example branch August 2, 2022 00:39
@github-actions github-actions bot mentioned this pull request Aug 11, 2022
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature/module (including request)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Construct an example on brain fMRI classification
6 participants