RandomProjectionFit
Description
The td_random_projection_fit_sqle()
function returns a random projection matrix
based on the specified arguments.
The function also returns the required parameters for transforming the
input data into lower-dimensional data. The td_random_projection_transform_sqle()
function uses the td_random_projection_fit_sqle()
output to reduce the
dimensionality of the input data.
Usage
td_random_projection_fit_sqle (
data = NULL,
target.columns = NULL,
num.components = NULL,
seed = NULL,
epsilon = 0.1,
density = 0.33333333,
projection.method = "GAUSSIAN",
output.featurenames.prefix = "td_rpj_feature",
...
)
Arguments
data |
Required Argument. |
target.columns |
Required Argument. |
num.components |
Required Argument. |
seed |
Optional Argument. |
epsilon |
Optional Argument. |
density |
Optional Argument. |
projection.method |
Optional Argument. |
output.featurenames.prefix |
Optional Argument. |
... |
Specifies the generic keyword arguments SQLE functions accept. Below
are the generic keyword arguments: 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_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
output.data
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 : Get random projection matrix for
# stock_movement tbl_teradata.
RandomProjectionFit_out <- td_random_projection_fit_sqle(
data = stock_movement,
target.columns = "1:",
epsilon = 0.9,
num.components = 343
)
# Print the result tbl_teradata objects.
print(RandomProjectionFit_out$result)
print(RandomProjectionFit_out$output.data)