hidimstat.permutation_test¶
- hidimstat.permutation_test(X, y, estimator, n_permutations=1000, seed=0, n_jobs=None, verbose=0)¶
Permutation test
This function compute the distribution of the weights of a linear model by shuffling the target Hirschhorn and Daly[1].
- Parameters:
- Xndarray, shape (n_samples, n_features)
Data.
- yndarray, shape (n_samples,)
Target.
- estimatorobject LinearModel
The linear model used to fit the data.
- n_permutationsint, optional (default=1000)
Number of permutations used to compute the survival function and cumulative distribution function scores.
- seedint, optional (default=0)
Determines the permutations used for shuffling the target
- n_jobsint or None, optional (default=None)
Number of CPUs to use during the cross validation.
- verboseint, optional (default=0)
The verbosity level of the joblib.Parallel.
- Returns:
- weightsndarray, shape (n_features,)
The weights of the original model.
- weights_distributionndarray, shape (n_permutations, n_features)
The distribution of the weights of the model obtained by shuffling the target n_permutations times.
References