Helper Module for Deep Learning.
Module that provides functions to prepare the Brats dataset.
-
class
pynet.datasets.connectome.ConnectomeInjury(base_filename, n_injuries=2, signature_seed=333)[source]¶ -
__init__(base_filename, n_injuries=2, signature_seed=333)[source]¶ Use to create synthetic injury data.
-
generate_injury(n_samples=100, noise_weight=0.125)[source]¶ Return n_samples of synthetic injury data and corresponding injury strength.
-
static
generate_injury_signatures(X_mn, n_injuries, r_state)[source]¶ Generates the signatures that represent the underlying signal in our synthetic experiments. d : (integer) the size of the input matrix (assumes is size dxd)
-
-
pynet.datasets.connectome.apply_injury_and_noise(X, Sig_A, weight_A, Sig_B, weight_B, noise_weight)[source]¶ Returns a symmetric, signed, noisy, adjacency matrix with simulated injury from two sources.
-
pynet.datasets.connectome.fetch_connectome(datasetdir, n_samples=112, seed=333)[source]¶ Fetch/prepare the Connectome injury dataset for pynet.
Refactoring of ann4brains.synthetic.injury.ConnectomeInjury.
To simulate realistic synthetic examples, a mean connectome of preterm infant data is perturbed by a simulated focal brain injury using a local signature pattern. Two focal injury signatures are applied on two injury regions. These two regions are chosen as the two rows with the highest median responses in order to simulate injury to important regions (i.e., hubs) of the brain.
- Parameters
datasetdir: str
the dataset destination folder.
n_samples: int, default 112
the number of samples.
seed: int, default None
use an int to make the randomness deterministic.
- Returns
injury: ConnectomeInjury
object used to create synthetic injury data.
x_train, y_train, x_test, y_test, x_valid, y_valid: array
the train/validation/test datasets.
-
pynet.datasets.connectome.get_k_strongest_regions(X, k, verbose=False)[source]¶ Return the k regions (matrix columns) with the highest median values.
Follow us
Inspired by AZMIND template.