2.1.0
User Documentation for Apache MADlib
stratified_sample.sql_in File Reference

SQL functions for stratified sampling. More...

Functions

void stratified_sample (text source_table, text output_table, float8 proportion, text grouping_cols, text target_cols, boolean with_replacement)
 
void stratified_sample (text source_table, text output_table, float8 proportion, text grouping_cols, text target_cols)
 
void stratified_sample (text source_table, text output_table, float8 proportion, text grouping_cols)
 
void stratified_sample (text source_table, text output_table, float8 proportion)
 
varchar stratified_sample (varchar message)
 
varchar stratified_sample ()
 

Detailed Description

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Date
07/19/2017
See also
Given a table, stratified sampling returns a proportion of records for each group (strata).

Function Documentation

◆ stratified_sample() [1/6]

void stratified_sample ( text  source_table,
text  output_table,
float8  proportion,
text  grouping_cols,
text  target_cols,
boolean  with_replacement 
)

◆ stratified_sample() [2/6]

void stratified_sample ( text  source_table,
text  output_table,
float8  proportion,
text  grouping_cols,
text  target_cols 
)

◆ stratified_sample() [3/6]

void stratified_sample ( text  source_table,
text  output_table,
float8  proportion,
text  grouping_cols 
)

◆ stratified_sample() [4/6]

void stratified_sample ( text  source_table,
text  output_table,
float8  proportion 
)

◆ stratified_sample() [5/6]

varchar stratified_sample ( varchar  message)

◆ stratified_sample() [6/6]

varchar stratified_sample ( )