Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Spline Tool Output

j_brzezinski
8 - Asteroid
What is  content of the spline tool output object?  I would like to extract lists of variables and coefficiects, r_square, and fitted values for additional analyses and visualizing actual vs fitted values (which are not in the reports output).
1 REPLY 1
ChadM
Alteryx Alumni (Retired)
For the Spline Tool, try dropping in a R Tool, then enter the following script:

the.model = read.Alteryx("#1")
the.model = unserializeObject(as.character(the.model$Object[1]))

## Extracting Coefficients ##
coefficients.names = row.names(the.model$coefficients)
the.model.coefficients = data.frame("Term" = coefficients.names, "Value" = as.vector(the.model$coefficients), row.names = NULL)
write.Alteryx(the.model.coefficients, nOutput = 1)

## Extracting R Squared ##
the.model.summary = data.frame("R.Squared" = the.model$rsq)
write.Alteryx(the.model.summary, nOutput = 2)

## Extracting Fitted Values ##
the.model.fitted.values = data.frame("Fitted.Values" = as.vector(the.model$fitted.values))
write.Alteryx(the.mode?l.fitted.values, nOutput = 3)
 

This will output your coefficients to output 1, the R Squared value to output 2, and the Fitted Values to output 3.  Thanks! 
Labels