Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

downer's scratchpad

by downer (Monk)
on Aug 14, 2007 at 16:58 UTC ( #632546=scratchpad: print w/replies, xml ) Need Help??

clinton's output:
BayesPointMachine: 0 0.1 0.1 0 0.3 0.2 0.3 0. +3 0 0 0 0 0 0 0 0 0 0 BestFirstTree: 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0.1 0 0.2 0.1 0 0.1 0.2 0.1 0.1 + 0.1 0.1 0.1 0.3 0.1 0.2 0.3 0.1 0.4 0. +3 0.3 0.2 0.2 0.1 0.2 0.2 0.2 0.1 0.2 0 +.4 0.3 0.1 0.3 0.1 0.5 0.3 0.2 0.2 0.4 +0.1 0.2 0.5 0.4 0.4 0.4 0.1 0.1 0.5 ComplimentNaiveBayes: 0 0 0 0 0 0 0 0 0.1 + 0 0 0 0 0 0 0 0 0 DescriminativeNaiveBayes: 0 0 0 0 0 0 0 0 +0.1 0.1 0 0 0 0 0 0 0 FURIA: 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0.2 0.1 0.1 0.1 0.1 0.1 0 0.1 + 0.2 0.2 0 0 0 0.2 0 0.1 0 0 0 0.1 + 0.1 0.2 0 0.1 0.1 0 0.2 0 0 0.1 0 +0 0.1 0 0 0 0 0.1 0.2 0 0 0 0 0 KNN: 0 0 0 0.1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 KSTAR: 0 0 0.1 0 0 0.2 0.1 0 0 0 0 + 0 0 0 0 0 0 0 0 0 LogisticRegression: 0.7 0.7 0.6 0.5 0.2 0.2 0 + 0 0 0 0 0 0 0 0 0 0 0 MultilayerPerceptron: 0 0 0 0 0.1 0 0 0 0 + 0 0 0 0.1 0 0 0 0 0 NaiveBayes: 0 0 0.1 0.1 0 0.1 0.2 0.2 0.2 + 0.2 0.2 0.2 0.1 0.1 0.1 0.2 0.1 0 0.1 + 0.1 0.1 0.3 0.3 0.2 0.3 0.2 0.1 0.3 0.2 + 0.2 0.1 0.2 0 0.2 0.2 0.1 0.1 0.1 0.2 + 0.4 0.3 0.1 0.2 0.1 0.1 0.2 0 0.2 0.4 + 0 0.1 0.1 0.1 0 0 0 0.2 0 0.1 0 PlattLL: 0.1 0 0 0 0 0.1 0.1 0.2 0.3 0. +3 0.5 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0 +.2 0.3 0 0.1 0.1 0.1 0.1 0.1 0.3 0.1 0. +3 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.2 0.2 0 +.1 0.1 0.1 0.1 0.3 0.2 0.1 0.1 0.2 0 0. +1 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.3 0.1 0 +.1 RBFN: 0.2 0.1 0.1 0.3 0.3 0.2 0.2 0.3 0.3 + 0.3 0.1 0.4 0.4 0.3 0.5 0.1 0.4 0.5 0.3 + 0.4 0.3 0.3 0.2 0.3 0.1 0.1 0.4 0.1 0. +2 0 0.2 0 0.2 0.2 0.2 0.1 0.1 0.2 0.2 + 0.3 0.3 0.2 0.2 0.3 0.2 0.2 0.3 0.3 0.3 + 0.5 0.2 0.5 0.5 0.1 0.1 0.4 0.1 0.4 0.5 + 0.3 RotationForest: 0 0.1 0 0 0.1 0 0.1 0 0 + 0.1 0.2 0.1 0.1 0.2 0.1 0 0 0.1 0.1 0. +1 0.1 0.2 0.3 0.2 0.2 0.1 0.3 0.1 0.2 0 +.2 0.1 0.2 0.2 0.1 0.1 0.3 0.2 0.1 0.2 +0 0 0.2 0 0.2 0.2 0.3 0.1 0 0 0.2 0. +1 0.1 0 0.1 0.1 0 0.1 0.2 0.2 0.1
sample output:
LogisticRegression = 1 BayesPointMachine = 2 PlattLL = 3 RBFN = 4 NaiveBayes = 5 RotationForest = 6 BestFirstTree = 7 FURIA = 8 DescriminativeNaiveBayes = 9 ComplimentNaiveBayes = 10 KSTAR = 11 KNN = 12 MultilayerPerceptron = 13 max is 13, md = 60 0.7 0.7 0.6 0.5 0.2 0.2 0 0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.2 0.2 0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 + 0 0.2 0.1 0 0.1 0.2 0.1 0.1 0.1 0.1 0 +.1 0.3 0.1 0.2 0.3 0.1 0.4 0.3 0.3 0.2 +0.2 0.1 0.2 0.2 0.2 0.1 0.2 0.4 0.3 0.1 + 0.3 0.1 0.5 0.3 0.2 0.2 0.4 0.1 0.2 0.5 + 0.4 0.4 0.4 0.1 0.1 0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0.2 0.1 0.1 0.1 0 0.1 0.1 0 0.1 0.2 + 0.2 0 0 0 0.2 0 0.1 0 0 0 0.1 0.1 + 0.2 0 0.1 0.1 0 0.2 0 0 0.1 0 0 0 +.1 0 0 0 0 0.1 0.2 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0.1 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0.1 0 0 0.2 0.1 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0.1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0.1 0 0 0 0 0 0 0 0.1 0 + 0 0 0 0 0 0 0
sample input:
LogisticRegression, LogisticRegression, LogisticRegression, LogisticRe +gression, LogisticRegression, LogisticRegression, BayesPointMachine, +BayesPointMachine, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, Platt +LL, PlattLL, PlattLL, RBFN, PlattLL, WekaNaiveBayes, RBFN, RBFN, RBFN +, RBFN, WekaNaiveBayes, WekaNaiveBayes, WekaNaiveBayes, WekaRotationF +orest, WekaRotationForest, WekaBestFirstTree, WekaFURIA, PlattLL, Wek +aBestFirstTree, WekaBestFirstTree, PlattLL, PlattLL, WekaRotationFore +st, WekaBestFirstTree, WekaFURIA, PlattLL, WekaFURIA, RBFN, RBFN, Wek +aBestFirstTree, PlattLL, RBFN, RBFN, RBFN, PlattLL, RBFN, RBFN, RBFN, + RBFN, RBFN, WekaRotationForest, WekaBestFirstTree, RBFN, WekaBestFir +stTree, PlattLL, RBFN, WekaBestFirstTree LogisticRegression, LogisticRegression, LogisticRegression, LogisticRe +gression, WekaRotationForest, PlattLL, PlattLL, PlattLL, WekaDescrimi +nativeNaiveBayes, WekaDescriminativeNaiveBayes, PlattLL, PlattLL, Pla +ttLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, +PlattLL, WekaNaiveBayes, PlattLL, RBFN, WekaRotationForest, WekaNaive +Bayes, RBFN, WekaNaiveBayes, WekaNaiveBayes, WekaRotationForest, Plat +tLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, P +lattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL +, PlattLL, PlattLL, WekaNaiveBayes, PlattLL, PlattLL, PlattLL, PlattL +L, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL LogisticRegression, LogisticRegression, LogisticRegression, LogisticRe +gression, BayesPointMachine, BayesPointMachine, BayesPointMachine, Ba +yesPointMachine, WekaComplimentNaiveBayes, RBFN, PlattLL, WekaRotatio +nForest, WekaRotationForest, WekaBestFirstTree, WekaRotationForest, W +ekaBestFirstTree, WekaBestFirstTree, WekaRotationForest, WekaFURIA, W +ekaRotationForest, PlattLL, WekaBestFirstTree, WekaBestFirstTree, Wek +aRotationForest, WekaBestFirstTree, WekaBestFirstTree, WekaRotationFo +rest, PlattLL, WekaRotationForest, PlattLL, WekaBestFirstTree, WekaNa +iveBayes, WekaBestFirstTree, WekaBestFirstTree, WekaBestFirstTree, We +kaRotationForest, WekaBestFirstTree, WekaBestFirstTree, WekaRotationF +orest, WekaNaiveBayes, WekaBestFirstTree, WekaBestFirstTree, WekaBest +FirstTree, WekaBestFirstTree, RBFN, WekaNaiveBayes, WekaBestFirstTree +, WekaNaiveBayes, WekaFURIA, WekaBestFirstTree, WekaBestFirstTree, RB +FN, WekaNaiveBayes, WekaBestFirstTree, WekaRotationForest, WekaBestFi +rstTree, WekaBestFirstTree, WekaRotationForest, WekaRotationForest, W +ekaBestFirstTree LogisticRegression, LogisticRegression, WekaNaiveBayes, RBFN, RBFN, RB +FN, RBFN, RBFN, RBFN, RBFN, WekaRotationForest, RBFN, RBFN, WekaRotat +ionForest, RBFN, WekaFURIA, WekaFURIA, WekaFURIA, WekaRotationForest, + WekaBestFirstTree, WekaFURIA, WekaFURIA, WekaRotationForest, WekaFUR +IA, WekaFURIA, WekaFURIA, WekaBestFirstTree, PlattLL, WekaBestFirstTr +ee, WekaFURIA, RBFN, WekaRotationForest, WekaBestFirstTree, WekaNaive +Bayes, WekaNaiveBayes, PlattLL, PlattLL, PlattLL, WekaBestFirstTree, +RBFN, RBFN, WekaBestFirstTree, WekaFURIA, WekaRotationForest, WekaRot +ationForest, WekaBestFirstTree, WekaBestFirstTree, WekaBestFirstTree, + WekaBestFirstTree, RBFN, PlattLL, WekaRotationForest, PlattLL, WekaB +estFirstTree, WekaFURIA, WekaBestFirstTree, WekaBestFirstTree, WekaRo +tationForest, RBFN, WekaBestFirstTree LogisticRegression, LogisticRegression, LogisticRegression, LogisticRe +gression, RBFN, KSTAR, BayesPointMachine, RBFN, PlattLL, PlattLL, Pla +ttLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, +PlattLL, PlattLL, PlattLL, WekaRotationForest, WekaRotationForest, Pl +attLL, RBFN, PlattLL, PlattLL, WekaNaiveBayes, WekaRotationForest, Pl +attLL, WekaRotationForest, WekaRotationForest, WekaRotationForest, We +kaRotationForest, WekaNaiveBayes, WekaNaiveBayes, RBFN, WekaRotationF +orest, WekaNaiveBayes, WekaNaiveBayes, WekaNaiveBayes, WekaRotationFo +rest, WekaNaiveBayes, RBFN, WekaNaiveBayes, WekaRotationForest, WekaB +estFirstTree, WekaBestFirstTree, WekaNaiveBayes, WekaRotationForest, +WekaBestFirstTree, WekaBestFirstTree, RBFN, WekaBestFirstTree, WekaBe +stFirstTree, WekaBestFirstTree, WekaNaiveBayes, RBFN, WekaNaiveBayes, + WekaRotationForest LogisticRegression, LogisticRegression, LogisticRegression, LogisticRe +gression, LogisticRegression, LogisticRegression, RBFN, BayesPointMac +hine, RBFN, WekaRotationForest, WekaRotationForest, RBFN, RBFN, WekaR +otationForest, RBFN, RBFN, RBFN, RBFN, RBFN, WekaBestFirstTree, RBFN, + WekaNaiveBayes, RBFN, WekaNaiveBayes, WekaNaiveBayes, RBFN, RBFN, We +kaNaiveBayes, WekaNaiveBayes, WekaNaiveBayes, WekaNaiveBayes, WekaNai +veBayes, RBFN, WekaNaiveBayes, RBFN, WekaFURIA, WekaRotationForest, R +BFN, RBFN, RBFN, RBFN, RBFN, RBFN, PlattLL, WekaRotationForest, RBFN, + RBFN, RBFN, RBFN, RBFN, RBFN, RBFN, RBFN, RBFN, RBFN, RBFN, RBFN, RB +FN, WekaRotationForest, RBFN RBFN, WekaRotationForest, KSTAR, KNN, BayesPointMachine, KSTAR, WekaNa +iveBayes, WekaNaiveBayes, WekaNaiveBayes, WekaNaiveBayes, WekaNaiveBa +yes, WekaNaiveBayes, MultilayerPerceptron, RBFN, RBFN, WekaFURIA, RBF +N, RBFN, RBFN, RBFN, RBFN, RBFN, WekaRotationForest, RBFN, WekaRotati +onForest, WekaRotationForest, RBFN, RBFN, RBFN, WekaBestFirstTree, We +kaBestFirstTree, WekaBestFirstTree, RBFN, RBFN, RBFN, WekaRotationFor +est, PlattLL, RBFN, WekaRotationForest, WekaBestFirstTree, WekaBestFi +rstTree, WekaBestFirstTree, RBFN, RBFN, WekaBestFirstTree, WekaRotati +onForest, RBFN, RBFN, WekaBestFirstTree, RBFN, WekaRotationForest, RB +FN, RBFN, WekaBestFirstTree, WekaBestFirstTree, RBFN, WekaBestFirstTr +ee, RBFN, RBFN, RBFN PlattLL, RBFN, RBFN, RBFN, RBFN, RBFN, WekaRotationForest, RBFN, RBFN, + RBFN, RBFN, RBFN, RBFN, RBFN, RBFN, WekaBestFirstTree, RBFN, RBFN, R +BFN, RBFN, WekaRotationForest, WekaRotationForest, WekaNaiveBayes, RB +FN, WekaFURIA, WekaBestFirstTree, RBFN, WekaBestFirstTree, RBFN, Weka +RotationForest, WekaBestFirstTree, WekaFURIA, PlattLL, RBFN, WekaRota +tionForest, RBFN, WekaFURIA, WekaFURIA, RBFN, RBFN, WekaFURIA, WekaRo +tationForest, WekaFURIA, RBFN, WekaBestFirstTree, WekaFURIA, WekaBest +FirstTree, RBFN, RBFN, RBFN, WekaBestFirstTree, RBFN, WekaBestFirstTr +ee, WekaFURIA, WekaFURIA, RBFN, WekaRotationForest, RBFN, RBFN, RBFN LogisticRegression, LogisticRegression, LogisticRegression, RBFN, Mult +ilayerPerceptron, WekaNaiveBayes, WekaNaiveBayes, PlattLL, PlattLL, P +lattLL, PlattLL, WekaNaiveBayes, WekaNaiveBayes, RBFN, RBFN, WekaNaiv +eBayes, WekaNaiveBayes, RBFN, WekaBestFirstTree, WekaNaiveBayes, Weka +BestFirstTree, WekaNaiveBayes, WekaNaiveBayes, WekaBestFirstTree, Wek +aNaiveBayes, WekaBestFirstTree, WekaNaiveBayes, WekaBestFirstTree, We +kaBestFirstTree, WekaNaiveBayes, WekaBestFirstTree, WekaBestFirstTree +, WekaRotationForest, WekaBestFirstTree, WekaBestFirstTree, WekaBestF +irstTree, WekaRotationForest, WekaBestFirstTree, WekaBestFirstTree, W +ekaNaiveBayes, WekaNaiveBayes, WekaBestFirstTree, WekaBestFirstTree, +WekaRotationForest, WekaBestFirstTree, WekaNaiveBayes, WekaBestFirstT +ree, WekaBestFirstTree, WekaNaiveBayes, WekaBestFirstTree, WekaBestFi +rstTree, WekaNaiveBayes, WekaBestFirstTree, WekaBestFirstTree, WekaBe +stFirstTree, WekaBestFirstTree, WekaNaiveBayes, WekaBestFirstTree, We +kaBestFirstTree, WekaBestFirstTree RBFN, BayesPointMachine, BayesPointMachine, WekaNaiveBayes, BayesPoint +Machine, BayesPointMachine, KSTAR, WekaNaiveBayes, WekaNaiveBayes, We +kaNaiveBayes, WekaNaiveBayes, RBFN, RBFN, WekaNaiveBayes, WekaNaiveBa +yes, WekaNaiveBayes, PlattLL, RBFN, PlattLL, RBFN, WekaNaiveBayes, RB +FN, WekaNaiveBayes, WekaRotationForest, PlattLL, WekaFURIA, WekaRotat +ionForest, PlattLL, PlattLL, PlattLL, RBFN, PlattLL, PlattLL, PlattLL +, PlattLL, PlattLL, WekaNaiveBayes, WekaNaiveBayes, WekaNaiveBayes, W +ekaNaiveBayes, WekaNaiveBayes, WekaNaiveBayes, WekaNaiveBayes, WekaNa +iveBayes, PlattLL, WekaRotationForest, WekaRotationForest, WekaNaiveB +ayes, WekaNaiveBayes, WekaRotationForest, WekaNaiveBayes, PlattLL, RB +FN, PlattLL, PlattLL, PlattLL, PlattLL, PlattLL, RBFN, WekaBestFirstT +ree
#!/usr/bin/perl use strict; use warnings; my $md = 0; my %M; my @r; for(my $i = 0; $i <= 13; $i++) { for(my $j = 0; $j <= 60; $j++) { $r[$i][$j] = 0; } } my $ct = 0; while(<>) { chomp; s/weka//ig; my @p = split /, /; foreach my $m (@p) { if(!exists $M{$m}) { $ct++; $M{$m} = $ct; } } for(my $i = 0; $i < @p; $i++) { my $m = $p[$i]; $r[$M{$m}][$i]++; #print "$m\t$M{$m}\t$i\t$r[$M{$m}][$i]\n"; } if(@p >$md) { $md = @p } } my $max = 0; foreach my $k (sort hashValueAscendingNum keys %M) { print "$k = $M{$k}\n"; if($M{$k} > $max) { $max = $M{$k} } } print "max is $max, md = $md\n"; for(my $j = 1; $j <=$max; $j++) { my $out = ""; for(my $i = 0; $i < $md; $i++) { my $tmp = 0; $tmp += $r[$j][$i]; $out .= $tmp/10; $out .= "\t"; } print "$out\n\n"; } sub hashValueAscendingNum { $M{$a} <=> $M{$b}; }
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2022-07-02 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (103 votes). Check out past polls.

    Notices?