📄 bayesol.1
字号:
\" t.TH BAYESOL 1 "Bayesian Classification Tools" "Version 1.3" "".SH NAMEbayesol \- a Bayes solution calculator for use with dbacl..SH SYNOPSIS.HP.B bayesol[-DVniv] -c .I riskspec[FILE]....HP.B bayesol-V.SH DESCRIPTION.PP.B bayesolis a Bayes solution calculator designed to combine the output of .BR dbacl (1) with a prior distribution and a risk specification, andcalculate the optimal Bayesian decision (which minimizes the posteriorrisk). .PPThe risk specification is read from the text file .I riskspec and must be written in a simple format described below. The .BR dbacl (1) output can either be read from FILE or from STDIN. .SH EXIT STATUSOn success, .B bayesolreturns a positive integer corresponding to the category with the lowest risk.In case of a problem, .B bayesolreturns zero..SH OPTIONS.IP -cClassify using .IR riskspec . See the section RISK SPECIFICATION..IP -iFully internationalized mode. Forces the use of wide characters internally,which is necessary in some locales. This incurs a noticeable performance penalty..IP -nPrint risk scores for each .IR category . Each score is the logarithm of the expected risk under that category..IP -vVerbose mode. Prints to STDOUT the category with minimum posterior risk.In case several categories are possible, prints the first category in the order in which they appearin the categories section of .IR riskpspec ..IP -DPrint debug output. Do not use..IP -VPrint the program version number and exit. .SH RISK SPECIFICATION.B bayesolneeds to read a text file .I riskspeccontaining a risk specification. The format of this text file is as follows.IP.nacategories { .IR cat1 , .IR cat2 , "" ..., .IR catN }.brprior { .IR p1 , .IR p2 , "" ..., .IR pN }.brloss_matrix {.br"\fIregex1\fR" \fIc1\fR [ .IR formula11 ,.IR formula12 , "" ...,.IR formula1N ].br"\fIregex2\fR" \fIc2\fR [ .IR formula21 ,.IR formula22 , "" ...,.IR formula2N ].br ..br ..br"\fIregexM\fR" \fIcM\fR [ .IR formulaM1 , .IR formulaM2 , "" ..., .IR formulaMN ].br}.br.ad.PPIn the above, .IR cat1 ,.IR cat2 , "" ..., .IR catN , are category names, .IR p1 ,.IR p2 , "" ...,.IR pN ,are non-negative numbers, .IR regex1 ,.IR regex2 , "" ...,.IR regexM ,are (possibly empty) regular expression strings, .IR c1 , .IR c2 , "" ...,.IR cM ,are instances of the category names .IR cat1 ,.IR cat2 , "" ...,.IR catN , and the formulas are numbers or mathematical expressions. .PPEvery category which appears in the categories section must appear at leastonce in the loss_matrix section, with an empty "" regular expression.To construct the actual loss matrix used in the decision calculations, .B bayesol selects, for each category appearing in the categories section,the first row whose regular expression is matchedwithin FILE or STDIN, or the first row with empty regular expression if thereare no matches..PPEach formula can be either a single number, or an algebraic combination ofthe operators exp(), log(), +, -, *, /, ^ and parentheses (). The string "inf"is parsed as the value infinity. Also, the string "complexity" is recognized, and converted to the complexity for that category as reported by .BR dbacl (1).Finally, if the corresponding regular expression contains submatches delimited by parentheses, their numerical values can be used inside the formulas as the special variables$1, ..., $9. Note that submatches which aren't numerical are converted to the value zero..PPCase is important. Spaces and newlines can be liberally inserted. Comments must start with a # and extend to the end of the line. .SH USAGE.PPTypically, .B bayesol is used together with .BR dbacl (1). An invocation looks like this:.PP.na% dbacl -c one -c two -c three sample.txt -vna | bayesol -c toy.risk -v.ad.PPSee also/usr/share/dbacl/doc/tutorial.html for a more detailed overview..SH SOURCE.PPThe source code for the latest version of this program is available at http://www.lbreyer.com/gpl.html.SH AUTHOR.PPLaird A. Breyer <laird@lbreyer.com>.SH SEE ALSO.PP.BR dbacl (1), .BR mailcross (1),.BR mailinspect (1),.BR regex (7)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -