亲爱的 - 我正在使用文本资源管理器来分析运输环境中一些有趣的“事件”数据。 我正在使用主题分析并确定了大约 15 个明智的“主题”。 是否有可能找出我的样本集中有多少文档“包含”每个主题 - 还没有找到一种方法来做到这一点。
欢迎任何指导
谢谢
看起来是一个很好的方法 - 如果有人知道一种可量化的方式来选择每个主题 vecto 的相关性的“截止”点,那就太好了
您应该能够使用文档主题向量。也许有人知道为每个向量选择决策点的可量化方法,我已经通过视觉和检查文档来做到这一点:
Names default to here( 1 );
dt = Open( "$Sample_data/Aircraft Incidents.jmp" );
te = dt << Text Explorer(
Text Columns( :Final Narrative ),
Latent Semantic Analysis(
1,
Maximum Number of Terms( 2128 ),
Minimum Term Frequency( 10 ),
Weighting( "TF IDF" ),
Number of Singular Vectors( 100 ),
Centering and Scaling( "Centered and Scaled" )
),
Topic Analysis( 1, Number of Topics( 10 ) ),
Tokenizing( "Basic Words" ),
Language( "English" ),
SendToReport(
Dispatch( {}, "Term and Phrase Lists", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "SVD Plots", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Topic Terms", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Topic Scores Plots", OutlineBox, {Close( 0 )} )
)
);
//Save the topic vectors
te << Save Document Topic Vectors;
//Decide what values relate to documents that contain the topic:
dt << Distribution(
Continuous Distribution( Column( :Topic 1 ) ),
Continuous Distribution( Column( :Topic 2 ) ),
Continuous Distribution( Column( :Topic 3 ) ),
Continuous Distribution( Column( :Topic 4 ) ),
Continuous Distribution( Column( :Topic 5 ) ),
Continuous Distribution( Column( :Topic 6 ) ),
Continuous Distribution( Column( :Topic 7 ) ),
Continuous Distribution( Column( :Topic 8 ) ),
Continuous Distribution( Column( :Topic 9 ) ),
Continuous Distribution( Column( :Topic 10 ) )
);
//Select rows with topic 1
dt << Select where( :Topic 1 > 5 );
//Or, count rows with topic 1:
Sum( (Column( dt, "Topic 1" ) << Get values) > 5 );
//returns 169