X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Froc.sh;h=e350585d10c56380d385722c0eba4cf33aaf13d3;hb=d01cc07b11b5919369bf4e8989360c2b4fe0380c;hp=df3312be1cdff41d769a961531eab637a03e37ca;hpb=a963b40705139469a43f5a117ceba66923b38785;p=pspp diff --git a/tests/command/roc.sh b/tests/command/roc.sh index df3312be1c..e350585d10 100755 --- a/tests/command/roc.sh +++ b/tests/command/roc.sh @@ -9,7 +9,7 @@ TESTFILE=$TEMPDIR/`basename $0`.sps if [ -z "$top_builddir" ] ; then top_builddir=. ; fi if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi top_builddir=`cd $top_builddir; pwd` -PSPP=$top_builddir/src/ui/terminal/pspp +PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT # ensure that top_srcdir is absolute top_srcdir=`cd $top_srcdir; pwd` @@ -68,10 +68,12 @@ begin data. 2 3 4 1 2 4 14 0 3 5 10 1 +. . 1 0 3 1 5 0 4 2 14 1 4 3 2 0 5 4 20 1 +5 4 20 . 5 5 1 0 end data. @@ -92,78 +94,59 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $PSPP --testing-mode $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi + activity="compare results" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - << EOF -1.1 ROC. Case Summary -#========#===================# -# # Valid N (listwise)# -# #==========#========# -#a #Unweighted|Weighted# -#========#==========#========# -#Positive# 5| 50.000# -#Negative# 5| 50.000# -#========#==========#========# -1.2 ROC. Area Under the Curve (x) -#====#==========#===============#=======================# -# | | | Asymp. 99% Confidence # -# | | +-----------+-----------# -#Area|Std. Error|Asymptotic Sig.|Lower Bound|Upper Bound# -#====#==========#===============#===========#===========# -#.910| .030| .000| .839| .981# -#====#==========#===============#===========#===========# -1.3 ROC. Coordinates of the Curve (x) -#====================================#===========#===============# -#Positive if greater than or equal to|Sensitivity|1 - Specificity# -#====================================#===========#===============# -# .000| 1.000| 1.000# -# 1.500| .960| .440# -# 2.500| .880| .160# -# 3.500| .680| .060# -# 4.500| .400| .020# -# 6.000| .000| .000# -#====================================#===========#===============# -2.1 ROC. Case Summary -#========#===================# -# # Valid N (listwise)# -# #==========#========# -#a #Unweighted|Weighted# -#========#==========#========# -#Positive# 5| 50.000# -#Negative# 5| 50.000# -#========#==========#========# -See pspp-1.png for a chart. -2.2 ROC. Area Under the Curve -#===================#====#==========#===============#=======================# -# # | | | Asymp. 95% # -# # | | +-----------+-----------# -#Variable under test#Area|Std. Error|Asymptotic Sig.|Lower Bound|Upper Bound# -#===================#====#==========#===============#===========#===========# -# x#.910| .030| .000| .860| .960# -# y#.697| .052| .001| .611| .783# -#===================#====#==========#===============#===========#===========# -2.3 ROC. Coordinates of the Curve -#=============#====================================#===========#===============# -#Test variable#Positive if greater than or equal to|Sensitivity|1 - Specificity# -#=============#====================================#===========#===============# -# x# .000| 1.000| 1.000# -# # 1.500| .960| .440# -# # 2.500| .880| .160# -# # 3.500| .680| .060# -# # 4.500| .400| .020# -# # 6.000| .000| .000# -#-------------#------------------------------------+-----------+---------------# -# y# .000| 1.000| 1.000# -# # 1.500| .960| .900# -# # 2.500| .680| .340# -# # 3.000| .600| .300# -# # 3.500| .600| .300# -# # 4.500| .200| .020# -# # 6.000| .000| .000# -#=============#====================================#===========#===============# +diff -c $TEMPDIR/pspp.csv - << EOF +Table: Case Summary +,Valid N (listwise), +a,Unweighted,Weighted +Positive,5,50.000 +Negative,5,50.000 + +Table: Area Under the Curve (x) +,,,Asymp. 99% Confidence Interval, +Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound +.910,.030,.000,.839,.981 + +Table: Coordinates of the Curve (x) +Positive if greater than or equal to,Sensitivity,1 - Specificity +.000,1.000,1.000 +1.500,.960,.440 +2.500,.880,.160 +3.500,.680,.060 +4.500,.400,.020 +6.000,.000,.000 + +Table: Case Summary +,Valid N (listwise), +a,Unweighted,Weighted +Positive,5,50.000 +Negative,5,50.000 + +Table: Area Under the Curve +,,,,Asymp. 95% Confidence Interval, +Variable under test,Area,Std. Error,Asymptotic Sig.,Lower Bound,Upper Bound +x,.910,.030,.000,.860,.960 +y,.697,.052,.001,.611,.783 + +Table: Coordinates of the Curve +Test variable,Positive if greater than or equal to,Sensitivity,1 - Specificity +x,.000,1.000,1.000 +,1.500,.960,.440 +,2.500,.880,.160 +,3.500,.680,.060 +,4.500,.400,.020 +,6.000,.000,.000 +y,.000,1.000,1.000 +,1.500,.960,.900 +,2.500,.680,.340 +,3.000,.600,.340 +,3.500,.600,.300 +,4.500,.200,.020 +,6.000,.000,.000 EOF if [ $? -ne 0 ] ; then fail ; fi