親愛的 - 我正在使用文本資源管理器來分析運輸環境中一些有趣的“事件”數據。 我正在使用主題分析並確定了大約 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