Subscribe Bookmark RSS Feed

Use Topics generated from SVD in Graph Builder


Community Trekker


Sep 22, 2015


I am using text analysis in JMP. I have created 10 different topics and saved the document topic vectors in my data table. I would like to use the graph builder so I will assign these topics to the x-axis and I have a continous variable to be assigned to the y-axis to see the impact of different topics on the y variable. However, these topics vectors are contionous variables and when I assigned them to the x-axis, their continous values are represented in the x-axis instead of taking the name to the topics. For instance,Topic 6 has these values listed [ -0.509149118

I would like to represent the topic name not the values of its in the x-axis. Any idea?


Community Trekker


Dec 17, 2013

It seems to me you can use the Set or Get Value Labels functions to assign the terms from your SVD to the numeric values corresponding to them


The numbers and terms could be paired together as two separate lists, one list for the numbers, second list for the terms. The pair may be used in creating a new column, say termcolumn. For example for your topic 6 values


Change your matrix of X-axis values [ -0.509149118, -0.485903794, -0.614487887, -0.615231139] to the list of numbers { -0.509149118, -0.485903794, -0.614487887, -0.615231139}, replacing the [] with {}.


Send a Get Values function message to get the terms from data table column (say it’s called termcolumn) and specify the value labels from both lists, e.g.


termscolumn = column(Word) << Get Values; // Word can be from a term frequency column


Copy the list from the JMP log and create a new column, termcolumn with the Value Labels assignment


:termcolumn << Value Labels({-0.509149118 = “Topic6term1”, -0.485903794 = “Topic6term2”, -0.614487887 = “Topic6term3”, -0.615231139 = “topic6term4”}) ;


Or alternatively,

:termcolumn << Value Labels({-0.509149118, -0.485903794, -0.614487887,  -0.615231139}, {“Topic6term1”, “Topic6term2”, “Topic6term3”, “Topic6term4”}) ;


Activate the value labels by sending a Use Value Labels message to the column :termcolumn << Use Value Labels(1) ;


You can revert back to the columns values by using the message :termcolumn << Use Value Labels(0);


The following link describes another way to change column values to values along with the JMP 13 Scripting Guide in the section “Set or Get Value Labels” on page 335.


Hope this helps