Github.aSiteOf.me

A Record Site of My life in GitHub.

A Naive-bayse-classify Document Classify Writed by Ruby

== Description:

naive_bayes_classify.rb

naive_bayes_classify is a document classify programme.
    Usage:
        naive_bayes_classify [options] +
    where [options] are:
    --train, -t \:   Train a model from a Dir
    --test, -e \:   Test a dir from Mode
    --model, -m \:   Model name for test or the output of train
    --thres, -h \:   Threshold value for Naive Bayes Classify (default: 1.5)
    --version, -v:   Print version and exit
    --help, -l:   Show this message

result_analyze.rb

result_analyze is a naive_bayes_classify result analyze programme.
    Usage:
        result_analyze [options] 
    where [options] are:
    --file, -f \:   Output file of "naive_bayes_classify"
    --version, -v:   Print version and exit
    --help, -h:   Show this message

== Example:

Sample Data: http://people.csail.mit.edu/jrennie/20Newsgroups/

train

    naive_bayes_classify.rb -t 20news-bydate-train -m 20news-bydate-train.model -h 1.5

test

    naive_bayes_classify.rb -e 20news-bydate-test -m 20news-bydate-train.model > 20news-bydate-test.res

result analysis

    result_analyze -f 20news-bydate-test.res