Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Dendrogram error. can anyone help?

Reply
Occasional Contributor
Posts: 7

Dendrogram error. can anyone help?

[ Edited ]

I'm trying to plot a dendrogram in SAS miner by SAS Code node using output of Cluster node and here's my code:

 

%em_register(key=Example, type=Data);
data &em_user_Example;
set &em_import_data;
run;
%em_report(key=Example, viewtype=DENDROGRAM, autodisplay=Y,
block=Dendrogram, name=_Name_, parent=_Parent_, height=_Varexp_);

 

it runs but it shows an error in the dendrogram window: "data is not assigned correctly".

can anyone help?

 

Thanks in advance.

Attachment
SAS Super FREQ
Posts: 272

Re: Dendrogram error. can anyone help?

I think you need to use a different data set - this code was using the training data, which doesn't have the needed variables..  And different variables as well.

 

This worked for me after a Cluster node (though I'm not sure if I'm using the correct variable for Height):

 

%em_register(key=Example, type=Data);
data &em_user_Example;
set &em_lib..clus_tree_plot;
run;
%em_report(key=Example, viewtype=DENDROGRAM, autodisplay=Y,
block=Dendrogram, name=Node, parent=Parent, height=LinkWidth);

Occasional Contributor
Posts: 7

Re: Dendrogram error. can anyone help?

Ca1.PNG

this is the exported data from Cluster node.

how do I create tree data to export it to the SAS Code node?

SAS Super FREQ
Posts: 272

Re: Dendrogram error. can anyone help?

The Cluster node creates that data set.  If you look in the Explorer window in Enterprise Miner, click on the Show Project Data checkbox, and go into the EmwsZ library that corresponds to your diagram.  All the Clus_ data sets are the ones created by the Cluster node (if you have multiple Cluster nodes, then the prefix will be something like Clus2_), including the Clus_tree_plot data set that I think is the one you want to use for the dendrogram.

Ask a Question
Discussion stats
  • 3 replies
  • 306 views
  • 1 like
  • 2 in conversation