Text Explorer
Associated Constructors
Text Explorer
Syntax: Text Explorer( Text Columns( columns ) )
Description: Parses words from text in a column, counts them, associates them with other columns, saves indicators, and graphs relationships.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Columns
By
Syntax: obj << By( column(s) )
Description: Produce multiple reports, one for each level of the variable(s).
JMP Version Added: Before version 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
ID
Syntax: obj << ID( column )
Description: A column used to identify separate respondents in the Save Stacked DTM for Association output data table, as well as the Latent Class Analysis report.
JMP Version Added: Before version 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer(
Text Columns( :Reasons Not to Floss ),
ID( :School Age Children )
);
obj << Save Stacked DTM For Association;
Text Columns
Syntax: obj << Text Columns( column(s) )
Description: A text column that contains the documents to be processed. Each row value is treated as one document.
JMP Version Added: Before version 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Validation
Syntax: obj << Validation( column )
Description: A numeric column containing two or three distinct values. If there are two values, the smaller value defines the training set and the larger value defines the validation set. If there are three values, these values define the training, validation, and test sets in order of increasing size. If there are more than three values, all but the smallest three are ignored.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer(
Text Columns( :Reasons Not to Floss ),
Validation( :School Age Children )
);
obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Item Messages
Add Delimiters
Syntax: obj << Add Delimiters( "string" )
Description: Adds user-supplied delimiter characters, in a single string, to the default list of delimiter characters for splitting words.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Tokenizing( "Basic Words" );
obj << Show Delimiters( 1 );
Wait( 1 );
obj << Add Delimiters( "{}" );
Add Phrase Exceptions
Syntax: obj << Add Phrase Exceptions( list )
Description: Adds a list of phrases to remove from the term list.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Add Phrases( {"twice a day", "every time", "time consuming"} );
Wait( 1 );
obj << Add Phrase Exceptions( {"every time"} );
Add Phrases
Syntax: obj << Add Phrases( list )
Description: Adds a list of phrases to the term list to be analyzed like single terms. The term counts are updated accordingly.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Add Phrases( {"twice a day", "every time"} );
Add Recode Exceptions
Syntax: obj << Add Recode Exceptions( { {pair1}, {pair2}, ...} )
Description: Adds a list of recoded text strings to remove.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Add Recodes( {{"everytime", "every time"}, {"neglagent", "negligent"}} );
obj << Show Recodes( 1 );
Wait( 1 );
obj << Add Recode Exceptions( {"neglagent", "negligent"} );
Add Recodes
Syntax: obj << Add Recodes( { {pair1}, {pair2}, ...} )
Description: Adds a list of pairs of words to recode.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Add Recodes( {{"everytime", "every time"}, {"neglagent", "negligent"}} );
obj << Show Recodes( 1 );
Add Stem Exceptions
Syntax: obj << Add Stem Exceptions( list )
Description: Adds a list of words that are excluded from stemming.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Stemming( "Stem All Terms" );
obj << Show Stem Report( 1 );
Wait( 1 );
obj << Add Stem Exceptions( {"care", "brush", "like"} );
Add Stem Overrides
Syntax: obj << Add Stem Overrides( list )
Description: Adds a list of words that are always allowed to be stemmed.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Stemming( "Stem All Terms" );
obj << Show Stem Report( 1 );
Wait( 1 );
obj << Add Stem Overrides( {"care"} );
obj << Add Stem Exceptions( {"care", "brush", "like"} );
Add Stop Word Exceptions
Syntax: obj << Add Stop Word Exceptions( list )
Description: Adds a list of words to be removed as stop words and added to the term list.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Show Stop Words( 1 );
Wait( 1 );
obj << Add Stop Word Exceptions( {"again", "are"} );
Add Stop Words
Syntax: obj << Add Stop Words( list )
Description: Adds a list of words to remove from the term list and ignore in the analysis.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Show Stop Words( 1 );
Wait( 1 );
obj << Add Stop Words( {"use", "feel", "like"} );
Cloud Width
Syntax: obj << Cloud Width( number )
Description: Sets the width of the word cloud to the specified number of pixels.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Show Word Cloud( 1 );
obj << Cloud Width( 150 );
Coloring
Syntax: obj << Coloring( "None"|"Uniform Color"|"Arbitrary Grays"|"Arbitrary Colors"|"By column values..." )
Description: Specifies the coloring of the terms in the word cloud.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Show Word Cloud( 1 );
obj << Coloring( "Arbitrary Colors" );
Custom Stemmer
Syntax: obj << Custom Stemmer( Function( {string, dot}, ... ) )
Description: Performs stemming according to your specifications. Specify a function that takes the 'string' argument (a term from a document), tests it to determine what pattern it contains, and replaces characters if necessary with the 'dot' argument. This function replaces the standard stemming algorithm. Any words that are changed should include the stemming dot on the end. If stemming is enabled for the platform, this function is called for each unique term found in the corpus.
JMP Version Added: 15
//This custom stemmer looks only for words ending in 'ing' and replaces the end with the stemming dot.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Stemming( "Stem All Terms" );
obj << Show Stem Report( 1 );
obj << Custom Stemmer(
Function( {string, dot},
If( Ends With( string, "ing" ),
Substr( string, 1, Length( string ) - 3 ) || dot,
string
)
)
);
Customize Regex
Syntax: obj = Text Explorer(...Customize Regex( state=0|1 )...)
Description: Opens the Text Explorer Regular Expression Editor to modify the regular expression settings. This option is available only with the Regex Tokenizing method.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Tokenizing( "Regex" );
obj << Customize Regex();
Discriminant Analysis
Syntax: obj << Discriminant Analysis( Maximum Number of Terms( number ), Minimum Number of Terms( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number oc Singular Vectors( number ), Column( :column name ) )
Description: Predicts a classification of each document into a category of a specified response column using linear discriminant analysis of the document term matrix.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Discriminant Analysis(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Column( :Gender )
);
Font
Syntax: obj << Font( font )
Description: Specifies the font, style, and size of the terms in the word cloud.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Show Word Cloud( 1 );
obj << Font( "Arial Narrow", 11, "Plain" );
Include Builtin Phrases
Syntax: obj << Include Builtin Phrases( state=0|1 )
Description: Specifies that the built-in phrases are included in the phrases that are used in the tokenizing process. On by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Include Builtin Phrases( 0 );
Include Builtin Stop Words
Syntax: obj << Include Builtin Stop Words( state=0|1 )
Description: Specifies that the built-in stop words are included in the stop words that are used in the tokenizing process. On by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Include Builtin Stop Words( 0 );
Language
Syntax: obj = Text Explorer(...Language( "Display Language"|"English"|"German"|"Spanish"|"French"|"Italian"|"Japanese"|"Chinese (Simplified)"|"Chinese (Traditional)"|"Korean" )...)
Description: Specifies the language used for text processing. This affects stemming and the built-in lists of stop words, recodes, and phrases.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( TextColumns( :Reasons Not to Floss ), Language( "German" ) );
Latent Class Analysis
Syntax: obj << Latent Class Analysis( Number of Clusters( number ), Maximum Number of Terms( number ), Minimum Term Frequency( number ) )
Description: Groups documents into clusters of similar documents using a latent class analysis on the binary weighted document term matrix.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Latent Semantic Analysis
Syntax: obj << Latent Semantic Analysis( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number of Singular Vectors( number ), Centering and Scaling( "Centered and Scaled",|"Centered"|"Uncentered" ) ); obj << SVD( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number of Singular Vectors( number ), Centering and Scaling( "Centered and Scaled",|"Centered"|"Uncentered" ) )
Description: Performs a sparse singular value decomposition of the document term matrix.
Example 1
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Latent Semantic Analysis(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 10 ),
Centering and Scaling( "Centered" )
);
Example 2
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << SVD(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 10 ),
Centering and Scaling( "Centered" )
);
Layout
Syntax: obj << Layout( "Ordered"|"Alphabetical"|"Centered" )
Description: Specifies the arrangement of the terms in the word cloud.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Show Word Cloud( 1 );
obj << Layout( "Alphabetical" );
Maximum Characters per Word
Syntax: obj = Text Explorer(...Maximum Characters per Word( number=50 )...)
Description: Specifies the largest number of characters that a word can contain to be included as a term in the analysis. "50" by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer(
TextColumns( :Reasons Not to Floss ),
Maximum Characters per Word( 15 )
);
Maximum Number of Phrases
Syntax: obj = Text Explorer(...Maximum Number of Phrases( number=5000 )...)
Description: Specifies the maximum number of phrases that appear in the phrase list. "5000" by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer(
TextColumns( :Reasons Not to Floss ),
Maximum Number of Phrases( 50 )
);
Maximum Words per Phrase
Syntax: obj = Text Explorer(...Maximum Words per Phrase( number=4 )...)
Description: Specifies a maximum number of words that a phrase can contain to be included as a phrase in the analysis. "4" by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer(
TextColumns( :Reasons Not to Floss ),
Maximum Words per Phrase( 2 )
);
Minimum Characters per Word
Syntax: obj = Text Explorer(...Minimum Characters per Word( number=1 )...)
Description: Specifies the number of characters that a word must contain to be included as a term in the analysis. "1" by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer(
TextColumns( :Reasons Not to Floss ),
Minimum Characters per Word( 3 )
);
Minimum Frequency for Phrase
Syntax: obj << Minimum Frequency for Phrase( number )
Description: Specifies the number of occurrences of a phrase for that phrase to be included in the phrase list. There is no minimum by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Minimum Frequency for Phrase( 5 );
Phrases Alphabetical
Syntax: obj << Phrases Alphabetical( state=0|1 )
Description: Sorts the phrase list alphabetically. The default is to sort by decreasing count.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Phrases Alphabetical( 1 );
Rotated SVD
Syntax: obj << Topic Analysis( Number of Topics ( number ) ) obj << Rotated SVD( Number of Topics( number ) )
Description: Performs a varimax-rotated singular value decomposition of the document term matrix to produce groups of terms called topics.
Example 1
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Latent Semantic Analysis(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 10 ),
Centering and Scaling( "Centered" )
);
obj << Show Term List( 0 );
obj << Show Phrase List( 0 );
obj << Show Summary Counts( 0 );
obj << Topic Analysis( Number of Topics( 5 ) );
Example 2
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Latent Semantic Analysis(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 10 ),
Centering and Scaling( "Centered" )
);
obj << Show Term List( 0 );
obj << Show Phrase List( 0 );
obj << Show Summary Counts( 0 );
obj << Rotated SVD( Number of Topics( 5 ) );
SVD
Syntax: obj << Latent Semantic Analysis( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number of Singular Vectors( number ), Centering and Scaling( "Centered and Scaled",|"Centered"|"Uncentered" ) ); obj << SVD( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number of Singular Vectors( number ), Centering and Scaling( "Centered and Scaled",|"Centered"|"Uncentered" ) )
Description: Performs a sparse singular value decomposition of the document term matrix.
Example 1
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Latent Semantic Analysis(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 10 ),
Centering and Scaling( "Centered" )
);
Example 2
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << SVD(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 10 ),
Centering and Scaling( "Centered" )
);
Save DTM Formula
Syntax: obj << Save DTM Formula( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weight( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ) )
Description: Saves a vector-valued formula column to the data table using the Text Score JSL function. The length of the vector depends on user-specified options for the maximum number of terms, the minimum term frequency, and the weighting.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Save DTM Formula(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" )
);
Save Document Term Matrix
Syntax: obj << Save Document Term Matrix( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weight( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ) )
Description: Saves columns to the data table for each column of the document term matrix. The number of columns depends on user-specified options for the maximum number of terms, the minimum term frequency, and the weighting.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Save Document Term Matrix(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" )
);
Save Stacked DTM for Association
Syntax: obj << Save Stacked DTM for Association
Description: Saves a stacked version of the document-term matrix into a new data table. If an ID variable is specified in the Text Explorer launch window, the ID variable is used to identify the rows that each term came from in the original text data table.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Save Stacked DTM For Association;
Save Term Table
Syntax: obj << Save Term Table
Description: Creates a JMP data table that contains each term from the Term List, the number of occurrences, and the number of documents that contain each term.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Save Term Table;
SaveRegexColumn
Syntax: obj << SaveRegexColumn( text )
Description: Saves the specified custom regular expressions to a new column in the data table.
dt = New Table( "WordTable",
New Column( "Original Words",
Character,
"Nominal",
Set Values( {"Quick brown", "foxes jumped", "over the", "lazy dog."} )
)
);
dt << Text Explorer(
Text Columns( :Original Words ),
// the regex: [a-z]*? means 0 or more letters, reluctantly. [aeiou] means one vowel.
// {2} means repeat twice.
// [a-z]* means 0 or more letters, greedily. (the rest of the word)
Set Regex(
Custom(
Title( "Two Vowels" ),
Regex( "(([a-z]*?[aeiou]){2}[a-z]*)" ),
Result( "\[\1]\" ),
)
),
Include Builtin Stop Words( 0 ), // "over" is a stop word, but we want to see it
SaveRegexColumn( "Poly Vowel Words" )
);
Score Terms by Column
Syntax: obj << Score Terms by Column( column )
Description: Saves scores based on values in a specified column to the data table created by the Save Term Table option. The scores for each term are the mean value of the specified column weighted by the number of occurrences of the term in each row.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Score Terms By Column( :Salary );
Sentiment Analysis
Syntax: obj << Sentiment Analysis( state=0|1 )
Description: Identifies sentiment terms in documents using lexical analysis and scores documents for positive, negative, and overall sentiment.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Set Delimiters
Syntax: obj << Set Delimiters( "string" )
Description: Replaces the default list of delimiter characters for splitting words with user-supplied characters in a single string.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Tokenizing( "Basic Words" );
obj << Show Delimiters( 1 );
obj << Set Delimiters( " " );
Set Regex
Syntax: obj << Set Regex( ... )
Description: Replaces the default regular expressions used in the Regex tokenizing method.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Set Regex( Library( "Words" ) );
Show Delimiters
Syntax: obj << Show Delimiters( state=0|1 )
Description: Shows or hides the delimiters that are used for tokenizing. This option is available only when the Tokenizing method is Basic Words.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Tokenizing( "Basic Words" );
Wait( 1 );
obj << Show Delimiters( 1 );
Show Filters for all Tables
Syntax: obj << Show Filters for all Tables( state=0|1 )
Description: Shows or hides filters that can be used for searching tables in the report. This option applies to the following tables: Stop Words, Specified Phrases, Stem Exceptions, Term List, Phrase List, and the Stem Report.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Show Filters for All Tables( 1 );
Show Legend
Syntax: obj << Show Legend( state=0|1 )
Description: Shows or hides the legend for the word cloud. On by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Show Word Cloud( 1 );
obj << Coloring( "Arbitrary Colors" );
Wait( 1 );
obj << Show Legend( 0 );
Show Phrase List
Syntax: obj << Show Phrase List( state=0|1 )
Description: Shows or hides the Phrase List report. On by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Show Phrase List( 0 );
Show Recodes
Syntax: obj << Show Recodes( state=0|1 )
Description: Shows or hides a list of the recoded terms.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Add Recodes( {{"flossing", "floss"}} );
Wait( 1 );
obj << Show Recodes( 1 );
Show Selected Rows
Syntax: obj << Show Selected Rows
Description: Opens a window that contains the text of the documents that are in the currently selected rows.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
Current Data Table() << Select Rows( [1 2 3 4] );
obj << Show Selected Rows( 1 );
Show Specified Phrases
Syntax: obj << Show Specified Phrases( state=0|1 )
Description: Shows or hides a list of the phrases that have been specified by the user to be treated as terms.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Show Specified Phrases( 1 );
Report( obj )["Specified Phrases"] << Close( 0 );
Show Stem Exceptions
Syntax: obj << Show Stem Exceptions( state=0|1 )
Description: Shows or hides the terms that are excluded from stemming.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Show Stem Exceptions( 1 );
Show Stem Report
Syntax: obj << Show Stem Report( state=0|1 )
Description: Shows or hides the Stemming report that contains two tables of stemming results.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Stemming( "Stem for Combining" );
obj << Show Stem Report( 1 );
Show Stop Words
Syntax: obj << Show Stop Words( state=0|1 )
Description: Shows or hides a list of stop words that are used in the analysis.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Show Stop Words( 1 );
Show Summary Counts
Syntax: obj << Show Summary Counts( state=0|1 )
Description: Shows or hides a table of summary counts. On by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Show Summary Counts( 0 );
Show Term List
Syntax: obj << Show Term List( state=0|1 )
Description: Shows or hides the Term List report. On by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Show Term List( 0 );
Show Term and Phrase Options
Syntax: obj << Show Term and Phrase Options( state=0|1 )
Description: Shows or hides buttons in the Term and Phrase Lists report that correspond to the options available in the pop-up menus for each list.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Show Term and Phrase Options( 1 );
Show Word Cloud
Syntax: obj << Show Word Cloud( state=0|1 )
Description: Shows or hides the word cloud.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Show Word Cloud( 1 );
Stemming
Syntax: obj = Text Explorer(...Stemming( "No Stemming"|"Stem for Combining"|"Stem All Terms" )...)
Description: Specifies a method for combining terms with similar beginning characters but different endings.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Stemming( "Stem All Terms" );
Term Selection
Syntax: obj << Term Selection( Models( Model( Response Column( <column> ), <other models> )), Model Choice( <index> ))
Description: Analyzes which terms best explain different responses. Term selection is also useful for sentiment analysis when the responses are ratings.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
term = obj << Term Selection(
Models(
Model(
Response Column( :Gender ),
Fits(
First Fit(
Fit(
Estimation Method( Elastic Net ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Model(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) ),
Fits(
First Fit(
Fit(
Estimation Method( Lasso ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Current Model Settings(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) )
)
),
Model Choice( 2 )
);
Terms Alphabetical
Syntax: obj << Terms Alphabetical( state=0|1 )
Description: Sorts the term list alphabetically. The default is to sort by decreasing count.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Terms Alphabetical( 1 );
Tokenizing
Syntax: obj = Text Explorer(...Tokenizing( "Regex"|"Basic Words" )...)
Description: Specifies a method for parsing the text into terms or tokens. The methods available are Regex and Basic Words.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Tokenizing( "Basic Words" );
Topic Analysis
Syntax: obj << Topic Analysis( Number of Topics ( number ) ) obj << Rotated SVD( Number of Topics( number ) )
Description: Performs a varimax-rotated singular value decomposition of the document term matrix to produce groups of terms called topics.
Example 1
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Latent Semantic Analysis(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 10 ),
Centering and Scaling( "Centered" )
);
obj << Show Term List( 0 );
obj << Show Phrase List( 0 );
obj << Show Summary Counts( 0 );
obj << Topic Analysis( Number of Topics( 5 ) );
Example 2
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Latent Semantic Analysis(
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 10 ),
Centering and Scaling( "Centered" )
);
obj << Show Term List( 0 );
obj << Show Phrase List( 0 );
obj << Show Summary Counts( 0 );
obj << Rotated SVD( Number of Topics( 5 ) );
Treat Numbers as Words
Syntax: obj = Text Explorer(...Treat Numbers as Words( state=0|1 )...)
Description: Considers words composed entirely of digits as tokens. Available only with the Basic Words tokenizing method.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
Wait( 1 );
obj << Tokenizing( "Basic Words" );
obj << Treat Numbers as Words( 1 );
Shared Item Messages
Action
Syntax: obj << Action
Description: All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Bivariate(
Y( :height ),
X( :weight ),
Action( Distribution( Y( :height, :weight ), Histograms Only ) )
);
Apply Preset
Syntax: Apply Preset( preset ); Apply Preset( source, label, <Folder( folder {, folder2, ...} )> )
Description: Apply a previously created preset to the object, updating the options and customizations to match the saved settings.
JMP Version Added: 18
Anonymous preset
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) );
preset = obj << New Preset();
dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" );
obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) );
Wait( 1 );
obj2 << Apply Preset( preset );
Search by name
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Oneway( Y( :height ), X( :sex ) );
Wait( 1 );
obj << Apply Preset( "Sample Presets", "Compare Distributions" );
Search within folder(s)
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Oneway( Y( :height ), X( :sex ) );
Wait( 1 );
obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) );
Automatic Recalc
Syntax: obj << Automatic Recalc( state=0|1 )
Description: Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Automatic Recalc( 1 );
dt << Select Rows( 5 ) << Exclude( 1 );
Broadcast
Syntax: obj << Broadcast(message)
Description: Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" );
objs = Control Chart Builder(
Variables( Subgroup( :DAY ), Y( :DIAMETER ) ),
By( :OPERATOR )
);
objs[1] << Broadcast( Save Summaries );
Column Switcher
Syntax: obj << Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >)
Description: Adds a control panel for changing the platform's variables
dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );
obj = dt << Contingency( Y( :size ), X( :marital status ) );
ColumnSwitcherObject = obj << Column Switcher(
:marital status,
{:sex, :country, :marital status}
);
Copy ByGroup Script
Syntax: obj << Copy ByGroup Script
Description: Create a JSL script to produce this analysis, and put it on the clipboard.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
obj[1] << Copy ByGroup Script;
Copy Script
Syntax: obj << Copy Script
Description: Create a JSL script to produce this analysis, and put it on the clipboard.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Copy Script;
Data Table Window
Syntax: obj << Data Table Window
Description: Move the data table window for this analysis to the front.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Data Table Window;
Get By Levels
Syntax: obj << Get By Levels
Description: Returns an associative array mapping the by group columns to their values.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) );
biv << Get By Levels;
Get ByGroup Script
Syntax: obj << Get ByGroup Script
Description: Creates a script (JSL) to produce this analysis and returns it as an expression.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
t = obj[1] << Get ByGroup Script;
Show( t );
Get Container
Syntax: obj << Get Container
Description: Returns a reference to the container box that holds the content for the object.
General
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
t = obj << Get Container;
Show( (t << XPath( "//OutlineBox" )) << Get Title );
Platform with Filter
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = Graph Builder(
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ) ),
Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ),
Local Data Filter(
Add Filter(
columns( :age, :sex, :height ),
Where( :age == {12, 13, 14} ),
Where( :sex == "F" ),
Where( :height >= 55 ),
Display( :age, N Items( 6 ) )
)
)
);
New Window( "platform boxes",
H List Box(
Outline Box( "Report(platform)", Report( gb ) << Get Picture ),
Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture )
)
);
Get Data Table
Syntax: obj << Get Data Table
Description: Returns a reference to the data table.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
t = obj << Get Datatable;
Show( N Rows( t ) );
Get Group Platform
Syntax: obj << Get Group Platform
Description: Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty().
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) );
group = biv[1] << Get Group Platform;
Wait( 1 );
group << Layout( "Arrange in Tabs" );
Get Script
Syntax: obj << Get Script
Description: Creates a script (JSL) to produce this analysis and returns it as an expression.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
t = obj << Get Script;
Show( t );
Get Script With Data Table
Syntax: obj << Get Script With Data Table
Description: Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
t = obj << Get Script With Data Table;
Show( t );
Get Timing
Syntax: obj << Get Timing
Description: Times the platform launch.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
t = obj << Get Timing;
Show( t );
Get Web Support
Syntax: obj << Get Web Support
Description: Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Bivariate( Y( :Weight ), X( :Height ) );
s = obj << Get Web Support();
Show( s );
Get Where Expr
Syntax: obj << Get Where Expr
Description: Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty()
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) );
biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) );
Show( biv[1] << Get Where Expr, biv2 << Get Where Expr );
Ignore Platform Preferences
Syntax: Ignore Platform Preferences( state=0|1 )
Description: Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Bivariate(
Ignore Platform Preferences( 1 ),
Y( :height ),
X( :weight ),
Action( Distribution( Y( :height, :weight ), Histograms Only ) )
);
Local Data Filter
Syntax: obj << Local Data Filter
Description: To filter data to specific groups or ranges, but local to this platform
dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );
dt << Distribution(
Nominal Distribution( Column( :country ) ),
Local Data Filter(
Add Filter( columns( :sex ), Where( :sex == "Female" ) ),
Mode( Show( 1 ), Include( 1 ) )
)
);
New JSL Preset
Syntax: New JSL Preset( preset )
Description: For testing purposes, create a preset directly from a JSL expression. Like <<New Preset, it will return a Platform Preset that can be applied using <<Apply Preset. But it allows you to specify the full JSL expression for the preset to test outside of normal operation. You will get an Assert on apply if the platform names do not match, but that is expected.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Oneway( Y( :Height ), X( :Age ) );
preset = obj << New JSL Preset( Oneway( Y( :A ), X( :B ), Each Pair( 1 ) ) );
Wait( 1 );
obj << Apply Preset( preset );
New Preset
Syntax: obj = New Preset()
Description: Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) );
preset = obj << New Preset();
Paste Local Data Filter
Syntax: obj << Paste Local Data Filter
Description: Apply the local data filter from the clipboard to the current report.
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
dist = Distribution( Continuous Distribution( Column( :POP ) ) );
filter = dist << Local Data Filter(
Add Filter( columns( :Region ), Where( :Region == "MW" ) )
);
filter << Copy Local Data Filter;
dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) );
Wait( 1 );
dist2 << Paste Local Data Filter;
Redo Analysis
Syntax: obj << Redo Analysis
Description: Rerun this same analysis in a new window. The analysis will be different if the data has changed.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Redo Analysis;
Redo ByGroup Analysis
Syntax: obj << Redo ByGroup Analysis
Description: Rerun this same analysis in a new window. The analysis will be different if the data has changed.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
obj[1] << Redo ByGroup Analysis;
Relaunch Analysis
Syntax: obj << Relaunch Analysis
Description: Opens the platform launch window and recalls the settings that were used to create the report.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Relaunch Analysis;
Relaunch ByGroup
Syntax: obj << Relaunch ByGroup
Description: Opens the platform launch window and recalls the settings that were used to create the report.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
obj[1] << Relaunch ByGroup;
Remove Column Switcher
Syntax: obj << Remove Column Switcher
Description: Removes the most recent Column Switcher that has been added to the platform.
dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );
obj = dt << Contingency( Y( :size ), X( :marital status ) );
ColumnSwitcherObject = obj << Column Switcher(
:marital status,
{:sex, :country, :marital status}
);
Wait( 2 );
obj << Remove Column Switcher;
Remove Local Data Filter
Syntax: obj << Remove Local Data Filter
Description: If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly
dt = Open( "$SAMPLE_DATA/Car Poll.jmp" );
dist = dt << Distribution(
Nominal Distribution( Column( :country ) ),
Local Data Filter(
Add Filter( columns( :sex ), Where( :sex == "Female" ) ),
Mode( Show( 1 ), Include( 1 ) )
)
);
Wait( 2 );
dist << remove local data filter;
Render Preset
Syntax: Render Preset( preset )
Description: For testing purposes, show the platform rerun script that would be used when applying a platform preset to the platform in the log. No changes are made to the platform.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Oneway( Y( :Height ), X( :Age ) );
obj << Render Preset( Expr( Oneway( Y( :A ), X( :B ), Each Pair( 1 ) ) ) );
Report
Syntax: obj << Report;Report( obj )
Description: Returns a reference to the report object.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
r = obj << Report;
t = r[Outline Box( 1 )] << Get Title;
Show( t );
Report View
Syntax: obj << Report View( "Full"|"Summary" )
Description: The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a <<Set Summary Behavior message.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Report View( "Summary" );
Save ByGroup Script to Data Table
Syntax: Save ByGroup Script to Data Table( <name>, < <<Append Suffix(0|1)>, < <<Prompt(0|1)>, < <<Replace(0|1)> );
Description: Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
obj[1] << Save ByGroup Script to Data Table;
Save ByGroup Script to Journal
Syntax: obj << Save ByGroup Script to Journal
Description: Create a JSL script to produce this analysis, and add a Button to the journal containing this script.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
obj[1] << Save ByGroup Script to Journal;
Save ByGroup Script to Script Window
Syntax: obj << Save ByGroup Script to Script Window
Description: Create a JSL script to produce this analysis, and append it to the current Script text window.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
obj[1] << Save ByGroup Script to Script Window;
Save Script for All Objects
Syntax: obj << Save Script for All Objects
Description: Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Save Script for All Objects;
Save Script for All Objects To Data Table
Syntax: obj << Save Script for All Objects To Data Table( <name> )
Description: Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes.
Example 1
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
obj[1] << Save Script for All Objects To Data Table;
Example 2
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
dt << New Column( "_bycol",
Character,
Nominal,
set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] )
);
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), By( _bycol ) );
obj[1] << Save Script for All Objects To Data Table( "My Script" );
Save Script to Data Table
Syntax: Save Script to Data Table( <name>, < <<Prompt(0|1)>, < <<Replace(0|1)> );
Description: Create a JSL script to produce this analysis, and save it as a table property in the data table.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Save Script to Data Table( "My Analysis", <<Prompt( 0 ), <<Replace( 0 ) );
Save Script to Journal
Syntax: obj << Save Script to Journal
Description: Create a JSL script to produce this analysis, and add a Button to the journal containing this script.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Save Script to Journal;
Save Script to Report
Syntax: obj << Save Script to Report
Description: Create a JSL script to produce this analysis, and show it in the report itself. Useful to preserve a printed record of what was done.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Save Script to Report;
Save Script to Script Window
Syntax: obj << Save Script to Script Window
Description: Create a JSL script to produce this analysis, and append it to the current Script text window.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Save Script to Script Window;
SendToByGroup
Syntax: SendToByGroup( {":Column == level"}, command );
Description: Sends platform commands or display customization commands to each level of a by-group.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Distribution(
By( :Sex ),
SendToByGroup(
{:sex == "F"},
Continuous Distribution( Column( :weight ), Normal Quantile Plot( 1 ) )
),
SendToByGroup( {:sex == "M"}, Continuous Distribution( Column( :weight ) ) )
);
SendToEmbeddedScriptable
Syntax: SendToEmbeddedScriptable( Dispatch( "Outline name", "Element name", command );
Description: SendToEmbeddedScriptable restores settings of embedded scriptable objects.
dt = Open( "$SAMPLE_DATA/Reliability/Fan.jmp" );
dt << Life Distribution(
Y( :Time ),
Censor( :Censor ),
Censor Code( 1 ),
<<Fit Weibull,
SendToEmbeddedScriptable(
Dispatch(
{"Statistics", "Parametric Estimate - Weibull", "Profilers", "Density Profiler"},
{1, Confidence Intervals( 0 ), Term Value( Time( 6000, Lock( 0 ), Show( 1 ) ) )}
)
)
);
SendToReport
Syntax: SendToReport( Dispatch( "Outline name", "Element name", Element type, command );
Description: Send To Report is used in tandem with the Dispatch command to customize the appearance of a report.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Distribution(
Nominal Distribution( Column( :age ) ),
Continuous Distribution( Column( :weight ) ),
SendToReport( Dispatch( "age", "Distrib Nom Hist", FrameBox, {Frame Size( 178, 318 )} ) )
);
Sync to Data Table Changes
Syntax: obj << Sync to Data Table Changes
Description: Sync with the exclude and data changes that have been made.
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
dist = Distribution( Continuous Distribution( Column( :POP ) ) );
Wait( 1 );
dt << Delete Rows( dt << Get Rows Where( :Region == "W" ) );
dist << Sync To Data Table Changes;
Title
Syntax: obj << Title( "new title" )
Description: Sets the title of the platform.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
obj << Title( "My Platform" );
Top Report
Syntax: obj << Top Report
Description: Returns a reference to the root node in the report.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) );
r = obj << Top Report;
t = r[Outline Box( 1 )] << Get Title;
Show( t );
Transform Column
Syntax: obj = <Platform>(... Transform Column(<name>, Formula(<expression>), [Random Seed(<n>)], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...)
Description: Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Distribution(
Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ),
Continuous Distribution( Column( :"age^2"n ) )
);
View Web XML
Syntax: obj << View Web XML
Description: Returns the XML code that is used to create the interactive HTML report.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Bivariate( Y( :Weight ), X( :Height ) );
xml = obj << View Web XML;
Window View
Syntax: obj = Text Explorer(...Window View( "Visible"|"Invisible"|"Private" )...)
Description: Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line );
eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text;
biv << Close Window;
New Window( "Bivariate Equation",
Outline Box( "Big Class Linear Fit", Text Box( eqn, <<Set Base Font( "Title" ) ) )
);
Discriminant Analysis
Associated Constructors
Discriminant Analysis
Syntax: obj << Discriminant Analysis( Maximum Number of Terms( number ), Minimum Number of Terms( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number oc Singular Vectors( number ), Column( :column name ) )
Description: Predicts a classification of each document into a category of a specified response column using linear discriminant analysis of the document term matrix.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Discriminant Analysis(
Maximum Number of Terms( 20 ),
Minimum Term Frequency( 3 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 15 ),
Column( :Floss )
);
Item Messages
Canonical Plot
Syntax: obj << Canonical Plot( state=0|1, N Canon( number ) )
Description: Shows or hides a plot of the documents and group means in canonical space. Canonical space is the space that most separates the groups.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Discriminant Analysis(
Maximum Number of Terms( 20 ),
Minimum Term Frequency( 3 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 15 ),
Column( :Floss )
);
obj2 << Canonical Plot( 1, N Canon( 3 ) );
Remove
Syntax: obj << Remove
Description: Removes the Discriminant Analysis report from the Text Explorer report window.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Discriminant Analysis(
Maximum Number of Terms( 20 ),
Minimum Term Frequency( 3 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 15 ),
Column( :Floss )
);
Wait( 1 );
obj2 << Remove;
Save Canonical Scores
Syntax: obj << Save Canonical Scores( N Canon( number ) )
Description: Saves columns to the data table that contain the scores from canonical space for each observation. Canonical space is the space that most separates the groups.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Discriminant Analysis(
Maximum Number of Terms( 20 ),
Minimum Term Frequency( 3 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 15 ),
Column( :Floss )
);
obj2 << Save Canonical Scores( N Canon( 3 ) );
Save Probabilities
Syntax: obj << Save Probabilities
Description: Saves a probability column to the data table for each response level as well as a column that contains the most likely response.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Discriminant Analysis(
Maximum Number of Terms( 20 ),
Minimum Term Frequency( 3 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 15 ),
Column( :Floss )
);
obj2 << Save Probabilities;
Save Probability Formulas
Syntax: obj << Save Probability Formulas
Description: Saves formula columns to the data table for the prediction of the most likely response. These columns use the Text Score function to calculate the probability for each response level.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Discriminant Analysis(
Maximum Number of Terms( 20 ),
Minimum Term Frequency( 3 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 15 ),
Column( :Floss )
);
obj2 << Save Probability Formulas;
LCA Analysis
Associated Constructors
Latent Class Analysis
Syntax: obj << Latent Class Analysis( Number of Clusters( number ), Maximum Number of Terms( number ), Minimum Term Frequency( number ) )
Description: Groups documents into clusters of similar documents using a latent class analysis on the binary weighted document term matrix.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Item Messages
Cluster Mixture Probabilities
Syntax: obj << Cluster Mixture Probabilities( state=0|1 )
Description: Shows or hides a table of probabilities of an observation belonging to each cluster. On by default.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Wait( 1 );
obj2 << Cluster Mixture Probabilities( 0 );
Cluster Probabilities by Row
Syntax: obj << Cluster Probabilities by Row( state=0|1 )
Description: Shows or hides the Mixture Probabilities table, which contains probabilities of cluster membership for each row. The Most Likely Cluster column indicates the cluster with the highest probability of membership for each row. On by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Wait( 1 );
obj2 << Cluster Probabilities by row( 0 );
Color by Cluster
Syntax: obj << Color by Cluster
Description: Colors each row in the data table according to its most likely cluster.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
obj2 << Color by Cluster;
MDS Plot
Syntax: obj << MDS Plot( state=0|1 )
Description: Shows or hides a multidimensional scaling plot, which is a two-dimensional representation of the proximity of the clusters. On by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Wait( 1 );
obj2 << MDS Plot( 0 );
Remove
Syntax: obj << Remove
Description: Removes the Latent Class Analysis report from the Text Explorer report.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Wait( 1 );
obj2 << Remove;
Rename Clusters
Syntax: obj << Rename Clusters( "name1", "name2", ... )
Description: Enables you to add descriptive names for one or more of the clusters.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Wait( 1 );
obj2 << Rename Clusters( "First", "Second", "Third", "Fourth", "Fifth" );
Save Probabilities
Syntax: obj << Save Probabilities
Description: Saves the probability of membership for a document to each cluster as a separate column in the data table.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
obj2 << Save Probabilities;
Save Probability Formulas
Syntax: obj << Save Probability Formulas
Description: Saves a formula column to the data table for each cluster as well as a formula column for the most likely cluster.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
obj2 << Save Probability Formulas;
Set Random Seed
Syntax: obj << Latent Class Analysis( Set Random Seed( number ) )
Description: Sets a random seed for the analysis.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 ),
Set Random Seed( 1234 )
);
Term Probabilities by Cluster
Syntax: obj << Term Probabilities by Cluster( state=0|1 )
Description: Shows or hides a table of terms with an estimate for each cluster. The estimate is the conditional probability that a document contains the term, given that the document belongs to a particular cluster. On by default.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Wait( 1 );
obj2 << Term Probabilities by Cluster( 0 );
Top Terms by Cluster
Syntax: obj << Top Terms by Cluster( state=0|1 )
Description: Shows or hides a table of the ten terms with the highest scores in each cluster. On by default.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
Wait( 1 );
obj2 << Top Terms by Cluster( 0 );
Word Clouds by Cluster
Syntax: obj << Word Clouds by Cluster( state=0|1 )
Description: Shows or hides a matrix of word clouds, one for each cluster.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Class Analysis(
Number of Clusters( 5 ),
Maximum Number of Terms( 10 ),
Minimum Term Frequency( 2 )
);
obj2 << Word Clouds by Cluster( 1 );
SVD Analysis > Topic Analysis
Associated Constructors
Rotated SVD
Syntax: obj << Topic Analysis( Number of Topics ( number ) ) obj << Rotated SVD( Number of Topics( number ) )
Description: Performs a varimax-rotated singular value decomposition of the document term matrix to produce groups of terms called topics.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Topic Analysis
Syntax: obj << Topic Analysis( Number of Topics ( number ) ) obj << Rotated SVD( Number of Topics( number ) )
Description: Performs a varimax-rotated singular value decomposition of the document term matrix to produce groups of terms called topics.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Item Messages
Remove
Syntax: obj << Remove
Description: Removes the Topic Analysis report from the SVD report.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Wait( 1 );
obj3 << Remove;
Rename Topics
Syntax: obj << Rename Topics
Description: Enables you to add descriptive names for one or more of the topics.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Wait( 1 );
obj3 << Rename Topics( "Too Busy", "Less Often", "Difficult", "Bed", "Week" );
Rotation Matrix
Syntax: obj << Rotation Matrix( state=0|1 )
Description: Shows or hides a rotation matrix for the varimax rotation.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
obj3 << Rotation Matrix( 1 );
Report( obj )["Rotation Matrix"] << Close( 0 );
Save Document Topic Vectors
Syntax: obj << Save Document Topic Vectors
Description: Saves the singular vectors from the topic analysis to new columns in the data table.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
obj3 << Save Document Topic Vectors;
Save Item Topic Vectors
Syntax: obj << Save Item Topic Vectors
Description: Saves the topic vectors to a new Item Topic Scores data table.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
obj3 << Save Item Topic Vectors;
Save Term Topic Vectors
Syntax: obj << Save Term Topic Vectors
Description: Saves the topic vectors from the topic analysis as columns in a new data table. If a Term Table is already open, then the columns are saved to that data table.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
obj << Save Term Table;
obj3 << Save Term Topic Vectors;
Save Topic Vector Formula
Syntax: obj << Save Topic Vector Formula
Description: Saves a formula with the Vector modeling type that contains the rotated singular value decomposition to the data table. The resulting column uses the Text Score function.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
obj3 << Save Topic Vector Formula;
Save Transaction Topic Vectors
Syntax: obj << Save Transaction Topic Vectors
Description: Saves a user-specified number of singular vectors from the rotated singular value decomposition (topic vectors) to new columns in the data table.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
obj3 << Save Transaction Topic Vectors;
Top Loadings by Topic
Syntax: obj << Top Loadings by Topic( state=0|1 )
Description: Shows or hides the Top Loadings by Topic report, which contains a table of terms for each topic. The terms in each table are the ones that have the largest loadings in absolute value for each topic. On by default.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Wait( 1 );
obj3 << Top Loadings by Topic( 0 );
Topic Loadings
Syntax: obj << Topic Loadings( state=0|1 )
Description: Shows or hides the Topic Loadings table, which contains a matrix of the loadings across topics for each term. On by default.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Report( obj )["Topic Loadings"] << Close( 0 );
Wait( 1 );
obj3 << Topic Loadings( 0 );
Topic Scatterplot Matrix
Syntax: obj << Topic Scatterplot Matrix( state=0|1 )
Description: Shows or hides a scatterplot matrix of the rotated singular value decomposition vectors.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Wait( 1 );
obj3 << Topic Scatterplot Matrix( 1 );
Topic Scores
Syntax: obj << Topic Scores( state=0|1 )
Description: Shows or hides a matrix of scores across topics for each document. On by default.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Report( obj )["Topic Scores"] << Close( 0 );
Wait( 1 );
obj3 << Topic Scores( 0 );
Topic Scores Plots
Syntax: obj << Topic Scores Plots( state=0|1 )
Description: Shows or hides a report that contains a plot of topic scores for each document. On by default.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Report( obj )["Topic Scores Plots"] << Close( 0 );
Wait( 1 );
obj3 << Topic Scores Plots( 0 );
Variance Explained by Each Topic
Syntax: obj << Variance Explained by Each Topic( state=0|1 )
Description: Shows or hides a table that contains the variance that is explained by each topic. The table also includes columns of the percent and cumulative percent of the variation that is explained by each topic.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Wait( 1 );
obj3 << Variance Explained by Each Topic( 1 );
Report( obj )["Variance Explained by Each Topic"] << Close( 0 );
Word Clouds by Topic
Syntax: obj << Word Clouds by Topic( state=0|1 )
Description: Shows or hides a matrix of word clouds, one for each topic.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer(
TextColumns( :Reasons Not to Floss ),
Show Term List( 0 ),
Show Phrase List( 0 ),
Show Summary Counts( 0 )
);
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj3 = obj2 << Topic Analysis( Number of Topics( 5 ) );
Wait( 1 );
obj3 << Word Clouds by Topic( 1 );
Report( obj )["Word Clouds by Topic"] << Close( 0 );
SVD Analysis
Associated Constructors
Latent Semantic Analysis
Syntax: obj << Latent Semantic Analysis( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number of Singular Vectors( number ), Centering and Scaling( "Centered and Scaled",|"Centered"|"Uncentered" ) ); obj << SVD( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number of Singular Vectors( number ), Centering and Scaling( "Centered and Scaled",|"Centered"|"Uncentered" ) )
Description: Performs a sparse singular value decomposition of the document term matrix.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
SVD
Syntax: obj << Latent Semantic Analysis( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number of Singular Vectors( number ), Centering and Scaling( "Centered and Scaled",|"Centered"|"Uncentered" ) ); obj << SVD( Maximum Number of Terms( number ), Minimum Term Frequency( number ), Weighting( "Binary"|"Ternary"|"Frequency"|"Log Freq"|"TF IDF" ), Number of Singular Vectors( number ), Centering and Scaling( "Centered and Scaled",|"Centered"|"Uncentered" ) )
Description: Performs a sparse singular value decomposition of the document term matrix.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
Item Messages
Cluster Documents
Syntax: obj << Cluster Documents( state=0|1 )
Description: Shows or hides a hierarchical clustering analysis of the documents in the data.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << Cluster Documents( 1 );
Cluster Items
Syntax: obj << Cluster Items( state=0|1 )
Description: Shows or hides a hierarchical clustering analysis of the terms in the data.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" );
obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) );
obj2 = obj << SVD( Number of Singular Vectors( 20 ) );
obj2 << Cluster Items( 1 );
Cluster Terms
Syntax: obj << Cluster Terms( state=0|1 )
Description: Shows or hides a hierarchical clustering analysis of the terms in the data.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << obj << Cluster Terms( 1 );
Cluster Transactions
Syntax: obj << Cluster Transactions( state=0|1 )
Description: Shows or hides a hierarchical clustering analysis of the documents in the data.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" );
obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) );
obj2 = obj << SVD( Number of Singular Vectors( 20 ) );
obj2 << Cluster Transactions( 1 );
Remove
Syntax: obj << Remove
Description: Removes the SVD report from the Text Explorer report window.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
Wait( 1 );
obj2 << Remove;
Rotated SVD
Syntax: obj << Topic Analysis( Number of Topics ( number ) ) obj << Rotated SVD( Number of Topics( number ) )
Description: Performs a varimax-rotated singular value decomposition of the document term matrix to produce groups of terms called topics.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj << Show Term List( 0 );
obj << Show Phrase List( 0 );
obj << Show Summary Counts( 0 );
obj2 << Topic Analysis( Number of Topics( 5 ) );
SVD Scatterplot Matrix
Syntax: obj << SVD Scatterplot Matrix( state=0|1, Number of Vectors( number ) )
Description: Shows or hides a scatterplot matrix of the term and document singular value decomposition vectors for each SVD Plot.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << SVD Scatterplot Matrix( 1, Number of Vectors( 8 ) );
Save Document Singular Vectors
Syntax: obj << Save Document Singular Vectors(number)
Description: Saves the specified number of singular vectors from the document singular value decomposition to new columns in the data table.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << Save Document Singular Vectors( 5 );
Save Item SVD
Syntax: obj << Save Item SVD
Description: Creates a data table that contains a number of singular vectors that you specify for each item. These are the right singular values in the transaction item matrix.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << Save Item SVD( 5 );
Save Item Singular Vectors
Syntax: obj << Save Item Singular Vectors
Description: Creates a data table that contains a number of singular vectors that you specify for each item. These are the right singular values in the transaction item matrix.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << Save Item Singular Vectors( 5 );
Save Singular Vector Formula
Syntax: obj << Save Singular Vector Formula
Description: Saves a vector-valued formula column that contains the document singular value decomposition to the data table. The formula column uses the Text Score function.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << Save Singular Vector Formula;
Save Term Singular Vectors
Syntax: obj << Save Term Singular Vectors( number )
Description: Saves the specified number of singular vectors from the terms singular value decomposition as columns in a new data table. Each row corresponds to a term. If a Term Table is already open, then the columns are saved to that data table.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << Save Term Singular Vectors( 5 );
Save Transaction SVD
Syntax: obj << Save Transaction SVD
Description: Creates a data table that contains a number of singular vectors that you specify for each transaction. These are the left singular values in the transaction item matrix.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << Save Transaction SVD( 5 );
Save Transaction Singular Vectors
Syntax: obj << Save Transaction Singular Vectors
Description: Creates a data table that contains a number of singular vectors that you specify for each transaction. These are the left singular values in the transaction item matrix.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj2 << Save Transaction Singular Vectors( 5 );
Select Near Neighbors
Syntax: obj << Select Near Neighbors( number=10 )
Description: Finds and selects the k nearest neighbors of the selected points in the document SVD plot. "10" by default.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
dt << Select Rows( [102, 237] );
obj2 << Select Near Neighbors( 8 );
Topic Analysis
Syntax: obj << Topic Analysis( Number of Topics ( number ) ) obj << Rotated SVD( Number of Topics( number ) )
Description: Performs a varimax-rotated singular value decomposition of the document term matrix to produce groups of terms called topics.
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = Text Explorer( TextColumns( :Reasons Not to Floss ) );
obj2 = obj << Latent Semantic Analysis(
Maximum Number of Terms( 100 ),
Minimum Term Frequency( 4 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 50 ),
Centering and Scaling( "Centered" )
);
obj << Show Term List( 0 );
obj << Show Phrase List( 0 );
obj << Show Summary Counts( 0 );
obj2 << Topic Analysis( Number of Topics( 5 ) );
Sentiment Analysis
Associated Constructors
Sentiment Analysis
Syntax: Sentiment Analysis( state=0|1 )
Description: Identifies sentiment terms in documents using lexical analysis and scores documents for positive, negative, and overall sentiment.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Item Messages
Add Feature Words
Syntax: obj << Add Feature Words( list )
Description: Adds a list of words to be scored as features.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
sent << Add Feature Words( {"floss"} );
Add Intensifier Exception Words
Syntax: obj << Add Intensifier Exception Words( list )
Description: Adds a list of intensifier terms to remove from the analysis.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Add Intensifier Exception Words( {"almost"} );
Add Intensifier Words
Syntax: obj << Add Intensifier Words( {{<word, multiplier>}, {<word>, <multiplier>}, ... } )
Description: Adds a list of words to use as intensifier terms in the analysis. Multipliers are floating point numbers usually in the range [-2, 2].
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Add Intensifier Words( {{"extreme", 1.8}, {"extremely", 1.8}} );
Add Negation Exception Words
Syntax: obj << Add Negation Exception Words( list )
Description: Adds a list of negation terms to remove from the analysis.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Add Negation Exception Words( {"without"} );
Add Negation Words
Syntax: obj << Add Negation Words( list )
Description: Adds a list of words to use as negation terms in the analysis.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Add Negation Words( {"dont"} );
Add Sentiment Exception Words
Syntax: obj << Add Sentiment Exception Words( list )
Description: Adds a list of sentiment terms to remove from the analysis.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Add Sentiment Exception Words( {"easy"} );
Add Sentiment Words
Syntax: obj << Add Sentiment Words( {{<word>, <score>}, {<word>, <score>}, ... } )
Description: Adds a list of words to use as sentiment terms in the analysis. Scores are integers in the range [-100, 100].
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Add Sentiment Words( {{"difficult", -70}, {"necessary", -20}} );
Include Builtin Intensifier Terms
Syntax: obj << Include Builtin Intensifier Terms( state=0|1 )
Description: Specifies that the built-in intensifier terms are included in the intensifier terms that are used in the sentiment analysis. On by default.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Include Builtin Intensifier Terms( 0 );
Include Builtin Negation Terms
Syntax: obj << Include Builtin Negation Terms( state=0|1 )
Description: Specifies that the built-in negation terms are included in the negation terms that are used for the sentiment analysis. On by default.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Include Builtin Negation Terms( 0 );
Include Builtin Sentiment Terms
Syntax: obj << Include Builtin Sentiment Terms( state=0|1 )
Description: Specifies that the built-in sentiment terms are included in the sentiment terms that are used in the sentiment analysis. On by default.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Include Builtin Sentiment Terms( 0 );
Parse Documents
Syntax: obj << Parse Documents( state=0|1 )
Description: Specifies that natural language processing (NLP) is used to parse the documents. On by default.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Parse Documents( 0 );
Save Count of Sentiment Scores by Document
Syntax: obj << Save Count of Sentiment Scores by Document
Description: Saves a column to the data table for each sentiment term. Each column contains counts of the occurrences of each sentiment term in each document.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
sent << Save Count of Sentiment Scores by Document;
Save Document Scores
Syntax: obj << Save Document Scores
Description: Saves the document scores to new columns in the data table.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
sent << Save Document Scores;
Score Column
Syntax: obj << Score Column( column )
Description: Specifies a column that contains known information to compare with the calculated sentiment.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
sent << Score Column( :Gender );
Scoring
Syntax: obj << Scoring( "Scaled"|"Min Max" )
Description: Sets the scoring style to calculate the overall score for documents. The Scaled option sums the scores of positive and negative phrases and then divides the sum by the number of phrases. The Min Max option is calculated as the sum of the maximum positive score and the minimum negative score.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Wait( 1 );
sent << Scoring( "Min Max" );
Show Feature Finder
Syntax: obj << Show Feature Finder( state=0|1 )
Description: Shows or hides a report that enables you to slice sentiment by selected features. On by default.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Report( obj )["Features"] << Close( 0 );
Wait( 2 );
sent << Show Feature Finder( 0 );
Show Intensifier Terms
Syntax: obj << Show Intensifier Terms( state=0|1 )
Description: Shows or hides the table of intensifier terms. On by default.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Report( obj )["Intensifier Terms"] << Close( 0 );
Wait( 2 );
sent << Show Intensifier Terms( 0 );
Show Negation Terms
Syntax: obj << Show Negation Terms( state=0|1 )
Description: Shows or hides the table of negation terms. On by default.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Report( obj )["Negation Terms"] << Close( 0 );
Wait( 2 );
sent << Show Negation Terms( 0 );
Show Sentiment Cloud
Syntax: obj << Show Sentiment Cloud( state=0|1 )
Description: Shows or hides the word cloud of sentiment phrases.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
sent << Show Sentiment Cloud( 1 );
Show Sentiment Terms
Syntax: obj << Show Sentiment Terms( state=0|1 )
Description: Shows or hides the table of sentiment terms. On by default.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
sent = obj << Sentiment Analysis( 1 );
Report( obj )["Sentiment Terms"] << Close( 0 );
Wait( 2 );
sent << Show Sentiment Terms( 0 );
Term Selection
Associated Constructors
Term Selection
Syntax: obj << Term Selection( Models( Model( Response Column( <column> ), <other models> )), Model Choice( <index> ))
Description: Analyzes which terms best explain different responses. Term selection is also useful for sentiment analysis when the responses are ratings.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
term = obj << Term Selection(
Models(
Model(
Response Column( :Gender ),
Fits(
First Fit(
Fit(
Estimation Method( Elastic Net ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Model(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) ),
Fits(
First Fit(
Fit(
Estimation Method( Lasso ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Current Model Settings(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) )
)
),
Model Choice( 2 )
);
Item Messages
Model Choice
Syntax: obj << Term Selection( Model Choice(<index>) )
Description: Specifies which model is the current model for the summary area.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
term = obj << Term Selection(
Models(
Model(
Response Column( :Gender ),
Fits(
First Fit(
Fit(
Estimation Method( Elastic Net ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Model(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) ),
Fits(
First Fit(
Fit(
Estimation Method( Lasso ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Current Model Settings(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) )
)
),
Model Choice( 2 )
);
Models
Syntax: obj << Term Selection( Models( Model( Response Column( <column> ), <other models> )))
Description: Specifies information that is necessary to generate a model.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
term = obj << Term Selection(
Models(
Model(
Response Column( :Gender ),
Fits(
First Fit(
Fit(
Estimation Method( Elastic Net ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Model(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) ),
Fits(
First Fit(
Fit(
Estimation Method( Lasso ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Current Model Settings(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) )
)
),
Model Choice( 2 )
);
Remove
Syntax: obj << Remove
Description: Removes the Term Selection report from the Text Explorer report window.
JMP Version Added: 14
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
term = obj << Term Selection(
Models(
Model(
Response Column( :Gender ),
Fits(
First Fit(
Fit(
Estimation Method( Elastic Net ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Model(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) ),
Fits(
First Fit(
Fit(
Estimation Method( Lasso ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Current Model Settings(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) )
)
),
Model Choice( 2 )
);
Wait( 1 );
term << Remove;
Save Document Scores
Syntax: obj << Save Document Scores
Description: Saves the document scores to new columns in the data table.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
term = obj << Term Selection(
Models(
Model(
Response Column( :Gender ),
Fits(
First Fit(
Fit(
Estimation Method( Elastic Net ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Model(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) ),
Fits(
First Fit(
Fit(
Estimation Method( Lasso ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Current Model Settings(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) )
)
),
Model Choice( 2 )
);
term << Save Document Scores;
Save Prediction Formulas
Syntax: obj << Save Prediction Formulas
Description: Saves columns to the data table that contain the prediction formulas for the currently selected analysis.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
term = obj << Term Selection(
Models(
Model(
Response Column( :Gender ),
Fits(
First Fit(
Fit(
Estimation Method( Elastic Net ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Model(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) ),
Fits(
First Fit(
Fit(
Estimation Method( Lasso ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Current Model Settings(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) )
)
),
Model Choice( 2 )
);
term << Save Prediction Formulas;
Save Term Score DTM
Syntax: obj << Save Term Score DTM
Description: Saves columns to the data table for each relevant term in the currently selected analysis.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
term = obj << Term Selection(
Models(
Model(
Response Column( :Gender ),
Fits(
First Fit(
Fit(
Estimation Method( Elastic Net ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Model(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) ),
Fits(
First Fit(
Fit(
Estimation Method( Lasso ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Current Model Settings(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) )
)
),
Model Choice( 2 )
);
term << Save Term Score DTM;
Show Term Cloud
Syntax: obj << Show Term Cloud( state=0|1 )
Description: Shows or hides a word cloud of the coefficient terms.
JMP Version Added: 16
dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ), Language( "English" ) );
term = obj << Term Selection(
Models(
Model(
Response Column( :Gender ),
Fits(
First Fit(
Fit(
Estimation Method( Elastic Net ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Model(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) ),
Fits(
First Fit(
Fit(
Estimation Method( Lasso ),
Validation Method( AICc ),
Early Stopping,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
),
Current Model Settings(
Response Column( :Single Status ),
Target Levels( Target Number( 1 ), Target String( "1" ) ),
Fit Settings( Estimation Method( Lasso ) )
)
),
Model Choice( 2 )
);
term << Show Term Cloud;