Binary Dataset

버전 1.0 (4.05 KB) 작성자: Kepeng Qiu
MATLAB code for 2D or 3D binary dataset for classification.
다운로드 수: 39
업데이트 날짜: 2022/5/13

🔥🔥 BinaryDataset

MATLAB code for 2D or 3D binary dataset.

✨ MAIN FEATURES

  • 2D or 3D binary dataset of "banana" and "circle" shapes.
  • Partitioning of training dataset/label and test dataset/label.

🔨 HOW TO USE

ocdata = BinaryDataset();
[data, label] = ocdata.generate;
[trainData, trainLabel, testData, testLabel] = ocdata.partition;

The full Name-Value Arguments of class BinaryDataset are

  • shape: shape of dataset, 'banana' or 'circle'.
  • dimensionality: dimensionality of dataset, 2 or 3.
  • number: number of samples per class, for example: [200, 200].
  • display: visualization, 'on' or 'off'.
  • noise: noise added to dataset with range [0, 1]. For example: 0.2.
  • ratio: ratio of the test set with range (0, 1). For example: 0.3.

👉 Example 1

Generate a 3D banana-shaped dataset with 200 and 100 samples for each class, and divide 10% of the data into the test dataset.

ocdata = BinaryDataset( 'shape', 'banana',...
                        'dimensionality', 3,...
                        'number', [200, 100],...
                        'display', 'on', ...
                        'noise', 0.2,...
                        'ratio', 0.1);
[data, label] = ocdata.generate;
[trainData, trainLabel, testData, testLabel] = ocdata.partition;

👉 Example 2

Generate a 2D circle-shaped dataset with 100 and 300 samples for each class, and divide 50% of the data into the test dataset.

ocdata = BinaryDataset( 'shape', 'circle',...
                        'dimensionality', 2,...
                        'number', [100, 300],...
                        'display', 'on', ...
                        'noise', 0.2,...
                        'ratio', 0.5);
[data, label] = ocdata.generate;
[trainData, trainLabel, testData, testLabel] = ocdata.partition;

인용 양식

Kepeng Qiu (2024). Binary Dataset (https://github.com/iqiukp/BinaryDataset/releases/tag/v1.0), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2022a
R2016b 이상 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
태그 태그 추가

Community Treasure Hunt

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

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

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.