Stratified matrix sampling

버전 1.0.0 (1.77 KB) 작성자: Jan Motl
Random matrix sampling, which is stratified by rows and columns
다운로드 수: 67
업데이트 날짜: 2019/7/9

라이선스 보기

We can easily sample a matrix with rand() function. However, this sampling is sometimes too random - we may end up with rows or columns without any sample and "screw" the downstream code. The canonical solution to this problem is to use stratified sampling. This function implements stratification by both, rows and columns, for a rectangular matrix.

The sampling is without replacement (each field in the matrix can be selected at most once). And we have to provide the count of samples that we want to select.

The function does not use rejection sampling and is reasonably fast (~twice as slow as rand()).

인용 양식

Jan Motl (2024). Stratified matrix sampling (https://www.mathworks.com/matlabcentral/fileexchange/72097-stratified-matrix-sampling), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2018a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Propagation and Channel Models에 대해 자세히 알아보기
태그 태그 추가

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0