샘플노드 속성

샘플 노드 아이콘 샘플 노드는 레코드의 하위 집합을 선택합니다. 계층화 표본, 군집 표본, 비랜덤(구조화된) 표본 등 다양한 표본 유형이 지원됩니다. 샘플링은 성능을 개선하고, 분석에 사용할 관련 기록이나 거래의 그룹을 선택하는 데 유용할 수 있습니다.

/* 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]])
표 1. samplenode 특성
samplenode properties 데이터 유형 특성 설명
method 단순 복합  
mode Include Discard 지정된 조건에 맞는 기록을 포함하거나 제외합니다.
sample_type First OneInN RandomPct 샘플링 방법을 지정합니다.
first_n 정수 지정된 마감 시점까지의 기록이 포함되거나 제외됩니다.
one_in_n 숫자 N번째 레코드를 포함하거나 제외합니다.
rand_pct 숫자 포함하거나 제외할 레코드의 비율을 지정합니다.
use_max_size 플래그 maximum_size 설정을 활성화합니다.
maximum_size 정수 데이터 스트림에서 포함되거나 제외될 가장 큰 샘플을 지정합니다. FirstInclude 가 지정되어 있을 때는 이 옵션이 중복되므로 비활성화됩니다.
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 숫자  
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 문자열  
sizes_proportions [[string 문자열 값 ][string 문자열 값 ]…] sample_units=proportionssample_size_proportions=Custom 는 계층화 필드의 가능한 각 값 조합에 대한 값을 지정합니다.
default_proportion 숫자  
sizes_counts [[string 문자열 값 ][string 문자열 값 ]…] 계층화 필드의 값 조합에 대한 값을 지정합니다. sizes_proportions 와 사용법은 비슷하지만, 비율 대신 정수를 지정합니다.
default_count 숫자