Description
Several Analytic Algorithms and Scoring functions output columns of XML.
This function transforms the XML to HTML, which is easier to view.
Function outputs the HTML in a column of type Teradata XML. You can copy
the HTML into a text file, give the text file a name ending in ".html",
and view it in a browser.
Alternatively, you can view the HTML in a Jupyter notebook by double-clicking
the cell that contains HTML to display it in web view.
Note:
This function is available in Vantage Analytic Library 2.0.0.3 or later.
Usage
td_xml_to_html_report_valib(data, analysis.type, ...)
Arguments
data |
Required Argument. |
analysis.type |
Required Argument.
Types: character |
... |
Specifies other arguments supported by the function as described in the 'Other Arguments' section. |
Value
Function returns an object of class "td_xml_to_html_report_valib"
which is a named list containing object of class "tbl_teradata".
Named list member can be referenced directly with the "$" operator
using name: result.
Other Arguments
filter
Optional Argument.
Specifies the clause to filter rows selected for
analysis.
For example,
filter = "cust_id > 0"
This parameter is useful only when the function
"analysis.type" (which outputs the input table name for
the report function) specified its "group.columns"
argument and generated multiple XML models.
Multiple XML models in input table name can cause the
function to run out of memory. In that case, limit the
rows selected for analysis with this argument.
Types: character
Examples
# Notes:
# 1. To execute Vantage Analytic Library functions, set option
# 'val.install.location' to the database name where Vantage analytic
# library functions are installed.
# 2. Datasets used in these examples can be loaded using Vantage Analytic
# Library installer.
# 3. The Statistical Test metadata tables must be loaded into the database
# where Analytics Library is installed.
# Set the option 'val.install.location'.
options(val.install.location = "SYSLIB")
# Get remote data source connection.
con <- td_get_context()$connection
# Create an object of class "tbl_teradata".
df <- tbl(con, "customer")
print(df)
# Example: Shows the Near Dependency Report is requested with related
# options. Convert the XML reports from the output of this
# function to HTML format.
lrobj <- td_log_reg_valib(data=df,
columns=c("age", "years_with_bank", "income"),
response.column="nbr_children",
response.value=1,
cond.ind.threshold=3,
variance.prop.threshold=0.3)
# Print the results.
print(lrobj$model)
print(lrobj$statistical.measures)
print(lrobj$xml.reports)
obj <- td_xml_to_html_report_valib(data=lrobj$model,
analysis.type="logistic")
# Print the results.
print(obj$result)