Francis Daly <francisdaly <at> gmail.com> writes:
[Message truncated to please the gmane web interface]
> If my description above is reasonable, then feeding the file through
> something like
>> sed '1,/Stratified cross-validation/d' | sed '1,/Detailed Accuracy By
> Class/d' | sed -e '1,2d' -e '/^$/,$d'
>> would be one way of only getting that table you want.
>> Sending that through
>> awk 'END{print a/NR, b/NR, c/NR, d/NR, e/NR, f/NR} {a+=$1; b+=$2;
> c+=$3; d+=$4; e+=$5; f+=$6}'
>> (Not pretty, but effective) will spit out the arithmetic mean of the
> exact numbers logged. You can tweak it to report only appropriate
> significant figures, if needed.
>> The processing is fragile because of the assumptions made. But if the
> file format matches, you're sorted.
The assumptions you made were correct.
>> If you really want, you could a2p or s2p those to turn them into perl.
>> Hope this pushes you in the right direction,
Super, thanks a million! This works perfectly on all the files I've
tested so far.
Marcus.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!