BookmarkSubscribeRSS Feed
saleh
Fluorite | Level 6

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.

3 REPLIES 3
WendyCzika
SAS Employee

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);

saleh
Fluorite | Level 6

Ca1.PNG

this is the exported data from Cluster node.

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

WendyCzika
SAS Employee

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1339 views
  • 1 like
  • 2 in conversation