📄 run.sh
字号:
#! /bin/csh -f## SNoW usage example: Training on simple boolean examples## The training examples used for this example are the same as those given in# the user guide for the disjunction x2 v x5. Using 9 examples of the# disjunction and two cycles over these examples, SNoW learns the concept with# 93.75% accuracy after two rounds of training. In a simple boolean example# like this, it turns out that a single Winnow learner will perform better# than two Winnows in the SNoW architecture. To confirm this, uncomment both# of the "set" commands that are commented out below and run this script# again. Since only one target is specified in the one_target.arch# architecture file, SNoW will make predictions as classical Winnow does:# comparing the target's activation to the specified threshold. With the# parameters specified in one_target.arch, classical Winnow learns the concept# with 100% accuracy over the entire six feature space after two rounds of# training.# Note the use of an eligibility threshold of 1. This is important in small# experiments such as this one, where some important features are much more# likely to only appear once with a target in the training examples. Also# note the -g- option, which disables the automatic generation of# conjunctions. Finally, note the use of the "allactivations" output mode,# allowing us to see results at a more detailed level than the default.echo "Testing SNoW using the boolean example data..."echo ""set train_file=two_targets_train.snow#set train_file=one_target_train.snowset test_file=booleantest.snowset net_file=boolean.netset arch_file=two_targets.arch#set arch_file=one_target.archset results_file=boolean.outecho "../snow -train -I $train_file -F $net_file -A $arch_file -e count:1 -g-"../snow -train -I $train_file -F $net_file -A $arch_file -e count:1 -g-echo ""echo "../snow -test -I $test_file -F $net_file -o allboth -R $results_file"../snow -test -I $test_file -F $net_file -o allboth -R $results_file
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -