Changes between Version 472 and Version 473 of WikiStart


Ignore:
Timestamp:
03/23/22 13:34:12 (3 years ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v472 v473  
    738738
    739739== LogConverter
    740 The LogConverter tool adds outcome utilities to APP.json and APPLearn.json log files. These log files contain a section  "results". T
     740The LogConverter tool adds outcome utilities to APP.json and APPLearn.json log files. These log files are just serialized NegoState objects. The converter picks up the results from these and adds utilities to them. Then it can write the results to stdout or a file, in either JSON or CSV format.
    741741
    742742You call the logconverter like this (download the logconverter from the artifactory, or download the sources):
    743743{{{
    744 java -jar target/logconverter-2.1.3-jar-with-dependencies.jar  src/test/resources/APP1646925947841.json
    745 }}}
     744java -jar target/logconverter-2.1.3-jar-with-dependencies.jar -s src/test/resources/APP1646925947841local.json -f CSV -o test.csv
     745}}}
     746
     747You can also convert an entire directory, like this (make sure you create the output dir and that all files in the source dir are NegoState objects)
     748{{{
     749java -jar target/logconverter-2.1.3-jar-with-dependencies.jar -s src/test/resources/ -f CSV -o test
     750}}}
     751
     752If your output is CSV format, you get a csv file with a header {{{session,party,profile,utility
     753}}} and one row of data for each session result.
     754 
     755If your output is JSON format, each SessionResult from the Session is converted to a SessionResultWithUtils, and the list of these objects is written.
    746756
    747757The logconverter adds a section "utilities" to each of the results, containing a dict with the final utility for each party. The final utility was defined in [#SessionResult the SessionResult section].
    748758
    749 The logconverter outputs the converted json file to stdout. You may want to redirect this into a file for use in a statistical package like R.
     759You can directly import the CSV for statistical postprocessing, for instance using R:
     760
     761{{{
     762R
     763data<-read.csv("test.csv")
     764aggregate(x=data$utility, by=list(data$party), FUN=mean)
     765}}}
     766
     767Of course you can also use any software that can read CSV to analyse the results, like Microsoft Excel, Python, Mathematica etc.
    750768
    751769= Example Parties