OutlierFilterFit
Description
The td_outlier_filter_fit_sqle()
function calculates the lower percentile, upper percentile,
count of rows and median for all the "target.columns" provided by the user.
These metrics for each column help the function td_outlier_transform_sqle()
detect
outliers in data. It stores parameters from arguments into an output used
during transformation.
Usage
td_outlier_filter_fit_sqle (
data = NULL,
target.columns = NULL,
group.columns = NULL,
lower.percentile = NULL,
upper.percentile = NULL,
iqr.multiplier = 1.5,
outlier.method = NULL,
replacement.value = NULL,
remove.tail = "BOTH",
percentile.method = NULL,
...
)
Arguments
data |
Required Argument. |
target.columns |
Required Argument. |
group.columns |
Optional Argument. |
lower.percentile |
Required Argument. |
upper.percentile |
Required Argument. |
iqr.multiplier |
Optional Argument. |
outlier.method |
Required Argument.
Types: character |
replacement.value |
Required Argument.
Types: character, integer, float |
remove.tail |
Optional Argument.
Default Value: "BOTH" |
percentile.method |
Required Argument.
Types: character |
... |
Specifies the generic keyword arguments SQLE functions accept. persist: volatile: Function allows the user to partition, hash, order or local order the input data. These generic arguments are available for each argument that accepts tbl_teradata as input and can be accessed as:
Note: |
Value
Function returns an object of class "td_outlier_filter_fit_sqle"
which is a named list containing object of class "tbl_teradata".
Named list member(s) can be referenced directly with the "$" operator
using the name(s):result
Examples
# Get the current context/connection.
con <- td_get_context()$connection
# Load the example data.
loadExampleData("tdplyr_example", "titanic")
# Create tbl_teradata object.
titanic_data <- tbl(con, "titanic")
# Check the list of available analytic functions.
display_analytic_functions()
# Example 1: Generating fit object to find outlier values in column "fare".
fit_obj <- td_outlier_filter_fit_sqle(data=titanic_data,
target.columns="fare",
lower.percentile=0.1,
upper.percentile=0.9,
outlier.method="PERCENTILE",
replacement.value="MEDIAN",
percentile.method="PERCENTILECONT")
# Print the result.
print(fit_obj$result)