Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Ideas

Share your Designer Desktop product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines

Decision Tree tool error when a model is induced with no branches

@KuoL 

 

Yes, I know, it's weird to have a situation where a decision tree decides that no branches should be created, but it happened, and caused great confusion, panic, and delay among my students.

 

v1.1 of the Decision Tool does a hard-stop and outputs nothing when this happens, not even the succesfully-created model object while v1.0 of the stool still creates the model ("O") and the report ("R") ... just not the "I" (interactive report). Using the v1.0 version of the tool, I traced the problem down to this call:

 

dt = renderTree(the.model, tooltipParams = tooltipParams)

Where `renderTree` is part of the `AlteryxRviz` library.

 

I dug deeper and printed a traceback.

 

9: stop("dim(X) must have a positive length")
8: apply(prob, 1, max) at <tmp>#5
7: getConfidence(frame)
6: eval(expr, envir, enclos)
5: eval(substitute(list(...)), `_data`, parent.frame())
4: transform.data.frame(vertices, predicted = attr(fit, "ylevels")[frame$yval],
       support = frame$yval2[, "nodeprob"], confidence = getConfidence(frame),
       probs = getProb(frame), counts = getCount(frame))
3: transform(vertices, predicted = attr(fit, "ylevels")[frame$yval],
       support = frame$yval2[, "nodeprob"], confidence = getConfidence(frame),
       probs = getProb(frame), counts = getCount(frame))
2: getVertices(fit, colpal)
1: renderTree(the.model)

The problem is that `getConfidence` pulls `prob` from the `frame` given to it, and in the case of a model with no branches, `prob` is a list. And dim(<a list>) return null. Ergo explosion.

 

Toy dataset that triggers the error, sample from the Titanic Kaggle competition (in which my students are competing). Predict "Survived" by "Pclass".

2 Comments
Community_Admin
Alteryx
Alteryx
Status changed to: Inactive
 
Community_Admin
Alteryx
Alteryx

The status of this idea has been changed to 'Inactive'. This status indicates that:

 

1. The idea has not had activity in the form of likes or comments in over a year.

2. The idea has not reached ten likes.

3. The idea is still in the 'New Idea' status. 

 

However, this doesn't mean your idea won't be implemented! The Community can still like and comment on this idea. With enough renewed interest, this idea can be brought back into the 'New Idea' status. 

 

Thank you for contributing to the Alteryx Community and the Alteryx Product Idea Boards!