RandomProjectionMinComponents
Description
The td_random_projection_min_components_sqle()
function calculates
"num_components" required for applying td_random_projection_fit_sqle()
on the given dataset for the specified "epsilon" (distortion) parameter value. The
function estimates the minimum value of the "num_components" argument in
the td_random_projection_fit_sqle()
function for a given dataset.
The function uses the Johnson-Lindenstrauss Lemma algorithm to calculate the value.
Usage
td_random_projection_min_components_sqle (
data = NULL,
target.columns = NULL,
epsilon = 0.1,
...
)
Arguments
data |
Required Argument. |
target.columns |
Required Argument. |
epsilon |
Optional Argument. |
... |
Specifies the generic keyword arguments SQLE functions accept. 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_random_projection_min_components_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", "stock_movement")
# Create tbl_teradata object.
stock_movement <- tbl(con, "stock_movement")
# Check the list of available analytic functions.
display_analytic_functions()
# Example 1 : Calculate the minimum number of components required
# for applying td_random_projection_fit_sqle().
RandomProjectionMinComponents_out <- td_random_projection_min_components_sqle(
data = stock_movement,
target.columns = "1:")
# Print the result.
print(RandomProjectionMinComponents_out$result)