SOLVED
Spline Tool Output
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
j_brzezinski
8 - Asteroid
‎10-18-2014
05:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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).
Solved! Go to Solution.
Labels:
- Labels:
- Predictive Analysis
1 REPLY 1
ChadM
Alteryx Alumni (Retired)
‎11-05-2014
11:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
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!
