kind of big changes here: we can now inspect & see the most positive and negative words for a trained svm, to help tune the value C. then there is also the UI for setting value C in the SVM. Finally the value of C I adjusted to default to 0.01 (was 0.1 before) because the results and the weights look more sensible based on manual inspection. We need some dataset of people libraries in order to potentially cross-validate a good value C automatically. For now there are not enough active users of the site that such a thing could be attempted and succeed. Doing my best now just by eyeballing
This commit is contained in:
@@ -13,31 +13,4 @@ const PaperLite = props => {
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
const Word = props => {
|
||||
const p = props.word;
|
||||
// word, weight, idf
|
||||
return (
|
||||
<div class='rel_word'>
|
||||
<div class='rel_word_weight'>{p.weight.toFixed(2)}</div>
|
||||
{/* <div class='rel_word_idf'>{p.idf.toFixed(2)}</div> */}
|
||||
<div class="rel_word_txt">{p.word}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const WordList = props => {
|
||||
const lst = props.words;
|
||||
const wlst = lst.map((jword, ix) => <Word key={ix} word={jword} />);
|
||||
return (
|
||||
<div>
|
||||
<div>The following are the tokens and their (tfidf) weight in the paper vector. This is the actual summary that feeds into the SVM to power recommendations, so hopefully it is good and representative!</div>
|
||||
<div id="wordList" class="rel_words">
|
||||
{wlst}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
ReactDOM.render(<PaperLite paper={paper} />, document.getElementById('wrap'))
|
||||
ReactDOM.render(<WordList words={words} />, document.getElementById('wordwrap'))
|
||||
|
||||
Reference in New Issue
Block a user