samplenode 특성
표본 노드는 레코드의 서브세트를 선택합니다. 층화, 수평배열, 비임의(구조화) 표본을 포함하여 다양한 표본 유형이 지원됩니다. 샘플링은 성능을 향상시키고 분석을 위해 관련 레코드 또는 트랜잭션 그룹을 선택하는 데 유용할 수 있습니다.
예
/* Create two Sample nodes to extract
different samples from the same data */
node = stream.create("sample", "My node")
node.setPropertyValue("method", "Simple")
node.setPropertyValue("mode", "Include")
node.setPropertyValue("sample_type", "First")
node.setPropertyValue("first_n", 500)
node = stream.create("sample", "My node")
node.setPropertyValue("method", "Complex")
node.setPropertyValue("stratify_by", ["Sex", "Cholesterol"])
node.setPropertyValue("sample_units", "Proportions")
node.setPropertyValue("sample_size_proportions", "Custom")
node.setPropertyValue("sizes_proportions", [["M", "High", "Default"], ["M", "Normal", "Default"],
["F", "High", 0.3], ["F", "Normal", 0.3]])
samplenode 특성 |
데이터 유형 | 특성 설명 |
|---|---|---|
method |
단순한 복잡성 | |
mode |
Include Discard |
지정된 조건을 만족하는 레코드를 포함 또는 삭제합니다. |
sample_type |
First OneInN RandomPct |
표본추출 방법을 지정합니다. |
first_n |
정수 | 지정된 분리점 위치까지의 레코드가 포함되거나 삭제됩니다. |
one_in_n |
Number | 모든 n번째 레코드를 포함 또는 삭제합니다. |
rand_pct |
Number | 포함 또는 삭제할 레코드의 퍼센트를 지정하십시오. |
use_max_size |
플래그 | maximum_size 설정을 사용하도록 설정하십시오. |
maximum_size |
정수 | 데이터 스트림에서 포함 또는 삭제될 가장 큰 표본을
지정하십시오. 이 옵션은 중복되므로 First 및 Include이(가) 지정된 경우 사용 불가능합니다. |
set_random_seed |
플래그 | 난수 시드 설정을 사용 가능하게 합니다. |
random_seed |
정수 | 난수 시드로 사용하는 값을 지정하십시오. |
complex_sample_type |
Random Systematic |
|
sample_units |
Proportions Counts |
|
sample_size_proportions |
Fixed Custom Variable |
|
sample_size_counts |
Fixed Custom Variable |
|
fixed_proportions |
Number | |
fixed_counts |
정수 | |
variable_proportions |
필드 | |
variable_counts |
필드 | |
use_min_stratum_size |
플래그 | |
minimum_stratum_size |
정수 | 이 옵션은 복합 샘플을 Sample
units=Proportions과(와) 함께 사용하는 경우에만 적용됩니다. |
use_max_stratum_size |
플래그 | |
maximum_stratum_size |
정수 | 이 옵션은 복합 샘플을 Sample
units=Proportions과(와) 함께 사용하는 경우에만 적용됩니다. |
clusters |
필드 | |
stratify_by |
[field1 ... fieldN] | |
specify_input_weight |
플래그 | |
input_weight |
필드 | |
new_output_weight |
string | |
sizes_proportions |
[[string 문자열 값][string 문자열 값]…] |
sample_units=proportions 및 sample_size_proportions=Custom인 경우, 계층화 필드 값의 가능한 각 조합에 대한 값을 지정합니다. |
default_proportion |
Number | |
sizes_counts |
[[string 문자열 값][string 문자열 값]…] |
층화 필드 값의 가능한 각 조합에 대한 값을
지정합니다. 사용법은 sizes_proportions과(와) 유사하지만 비율이 아닌 정수를 지정합니다. |
default_count |
Number |