フィルターのクリア

Calculating the between-column squared correlations

2 ビュー (過去 30 日間)
Amin Kassab-Bachi
Amin Kassab-Bachi 2021 年 10 月 31 日
コメント済み: Amin Kassab-Bachi 2021 年 11 月 1 日
I want to use the Latin hypercube sample function (lhsdesign). In the examples provided in the documentation the quality of the generated design is measured by calculating the sum of between-column aquared correlations,
rng default % For reproducibility
X= lhsdesign(10,4); % X is a 10-by-4 design matrix.
y= corr(X);
(sum(y(:).^2)-4)/2 % the 4 subtracted to remove the ones on the diagonal of y.
Why was the sum of the squared correlations divided by 2 ?
Thanks

採用された回答

Matt J
Matt J 2021 年 10 月 31 日
編集済み: Matt J 2021 年 10 月 31 日
I would guess it's account for the symmetry of the y matrix ... so that off-diagonal terms will not be double counted.
  1 件のコメント
Amin Kassab-Bachi
Amin Kassab-Bachi 2021 年 11 月 1 日
True! I didn't notice at all! Thanks a lot for taking the time.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIndustrial Statistics についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by