rand_unique_pairs(N, pair_num, ordered, self_pair)
This function could be handy for sampling pair-wise correlation from a large number of variables.
Input arguments:
N: defines the range of the numbers (from 1 to N)
pair_num: the number of pairs
ordered: 1 for ordered pairs and 0 for unordered. The default is 0.
self_pair: 1 for allowing self-pair (e.g, 3-3 is a self-pair). The default is 0.
Output argument:
pairs: a 2-by-pair_num matrix with each row containing a unique pair
Zitieren als
Yifan Gu (2024). rand_unique_pairs(N, pair_num, ordered, self_pair) (https://www.mathworks.com/matlabcentral/fileexchange/61456-rand_unique_pairs-n-pair_num-ordered-self_pair), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- AI, Data Science, and Statistics > Statistics and Machine Learning Toolbox > Regression > Generalized Linear Models > Generalized Linear Regression >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.2.0.0 | Fix some errors |
||
1.1.0.0 | Update the description. |
||
1.0.0.0 |