MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Robot_labs_around_the_World",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "1509": {
                "pageid": 1509,
                "ns": 0,
                "title": "Repository of R scripts used by IRIDIA members",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "==Max's scripts==\n\n===Boxplot of solution values by algorithm===\n\n[[Image:Tai100a 1000.png]]\n\nI organize the data in the following way:\n\nin the file '''optimal_values.txt''' I put the best-known solution values for the problem instances I'm testing\n<pre>\ncat optimal_values.txt \n\ninstance   optimum \nsko100a    152002 \nsko100e    149150 \ntai100a    21059006 \ntai100b    1185996137 \n</pre>\n\n\nin the files '''algorithm_factors_instance-size_cut-time.txt''' I record the history of the search of the algo for the instance\n<pre>\n head sequential_2-opt_100_8000.txt \n\nidalgo          topo    schema  ls      type    cpu_id  instance        try     best    time    iteration\nSEQ-2opt        SEQ     SEQ     2       Seq     0       sko100a         1       155468  0.31    1\nSEQ-2opt        SEQ     SEQ     2       Seq     0       sko100a         1       155390  0.31    1\nSEQ-2opt        SEQ     SEQ     2       Seq     0       sko100a         1       155000  0.31    1\nSEQ-2opt        SEQ     SEQ     2       Seq     0       sko100a         1       154934  0.64    2\nSEQ-2opt        SEQ     SEQ     2       Seq     0       sko100a         1       154608  0.97    3\nSEQ-2opt        SEQ     SEQ     2       Seq     0       sko100a         1       153958  1.27    4\nSEQ-2opt        SEQ     SEQ     2       Seq     0       sko100a         1       153750  1.93    6\nSEQ-2opt        SEQ     SEQ     2       Seq     0       sko100a         1       153720  1.93    6\nSEQ-2opt        SEQ     SEQ     2       Seq     0       sko100a         1       153634  2.57    8\n</pre>\n\nIn order to produce boxplots like the one above you can look at the R source used to produce it.  \n\n\n<pre>\noptimal_values<-read.table(\"optimal_values_100.txt\",header=TRUE)\nresPIR2OPT<-read.table(\"parallel_independent_2-opt_100_100.txt\",header=TRUE)\nresSEQ2OPT<-read.table(\"sequential_2-opt_100_800.txt\",header=TRUE)\nresSEQ22OPT<-read.table(\"sequential2_2-opt_100_100.txt\",header=TRUE)\nresFC1x102OPT<-read.table(\"fc.1.x.10_2-opt_100_100.txt\",header=TRUE)\nresFC26102OPT<-read.table(\"fc.2.6.10_2-opt_100_100.txt\",header=TRUE)\nresFC27102OPT<-read.table(\"fc.2.7.10_2-opt_100_100.txt\",header=TRUE)\nresFC28102OPT<-read.table(\"fc.2.8.10_2-opt_100_100.txt\",header=TRUE)\nresFC29102OPT<-read.table(\"fc.2.9.10_2-opt_100_100.txt\",header=TRUE)\nresFC36102OPT<-read.table(\"fc.3.6.10_2-opt_100_100.txt\",header=TRUE)\nresFC37102OPT<-read.table(\"fc.3.7.10_2-opt_100_100.txt\",header=TRUE)\nresFC38102OPT<-read.table(\"fc.3.8.10_2-opt_100_100.txt\",header=TRUE)\nresFC39102OPT<-read.table(\"fc.3.9.10_2-opt_100_100.txt\",header=TRUE)\nresHC1x102OPT<-read.table(\"hc.1.x.10_2-opt_100_100.txt\",header=TRUE)\nresHC26102OPT<-read.table(\"hc.2.6.10_2-opt_100_100.txt\",header=TRUE)\nresHC27102OPT<-read.table(\"hc.2.7.10_2-opt_100_100.txt\",header=TRUE)\nresHC28102OPT<-read.table(\"hc.2.8.10_2-opt_100_100.txt\",header=TRUE)\nresHC29102OPT<-read.table(\"hc.2.9.10_2-opt_100_100.txt\",header=TRUE)\nresHC36102OPT<-read.table(\"hc.3.6.10_2-opt_100_100.txt\",header=TRUE)\nresHC37102OPT<-read.table(\"hc.3.7.10_2-opt_100_100.txt\",header=TRUE)\nresHC38102OPT<-read.table(\"hc.3.8.10_2-opt_100_100.txt\",header=TRUE)\nresHC39102OPT<-read.table(\"hc.3.9.10_2-opt_100_100.txt\",header=TRUE)\nresRW1x102OPT<-read.table(\"rw.1.x.10_2-opt_100_100.txt\",header=TRUE)\nresRW26102OPT<-read.table(\"rw.2.6.10_2-opt_100_100.txt\",header=TRUE)\nresRW27102OPT<-read.table(\"rw.2.7.10_2-opt_100_100.txt\",header=TRUE)\nresRW28102OPT<-read.table(\"rw.2.8.10_2-opt_100_100.txt\",header=TRUE)\nresRW29102OPT<-read.table(\"rw.2.9.10_2-opt_100_100.txt\",header=TRUE)\nresRW36102OPT<-read.table(\"rw.3.6.10_2-opt_100_100.txt\",header=TRUE)\nresRW37102OPT<-read.table(\"rw.3.7.10_2-opt_100_100.txt\",header=TRUE)\nresRW38102OPT<-read.table(\"rw.3.8.10_2-opt_100_100.txt\",header=TRUE)\nresRW39102OPT<-read.table(\"rw.3.9.10_2-opt_100_100.txt\",header=TRUE)\nresUR1x102OPT<-read.table(\"ur.1.x.10_2-opt_100_100.txt\",header=TRUE)\nresUR26102OPT<-read.table(\"ur.2.6.10_2-opt_100_100.txt\",header=TRUE)\nresUR27102OPT<-read.table(\"ur.2.7.10_2-opt_100_100.txt\",header=TRUE)\nresUR28102OPT<-read.table(\"ur.2.8.10_2-opt_100_100.txt\",header=TRUE)\nresUR29102OPT<-read.table(\"ur.2.9.10_2-opt_100_100.txt\",header=TRUE)\nresUR36102OPT<-read.table(\"ur.3.6.10_2-opt_100_100.txt\",header=TRUE)\nresUR37102OPT<-read.table(\"ur.3.7.10_2-opt_100_100.txt\",header=TRUE)\nresUR38102OPT<-read.table(\"ur.3.8.10_2-opt_100_100.txt\",header=TRUE)\nresUR39102OPT<-read.table(\"ur.3.9.10_2-opt_100_100.txt\",header=TRUE)\n\nres<-rbind(resFC1x102OPT,resFC26102OPT,resFC27102OPT,resFC28102OPT,resFC29102OPT,resFC36102OPT,\nresFC37102OPT,resFC38102OPT,resFC39102OPT,resRW1x102OPT,resRW26102OPT,resRW27102OPT,resRW28102OPT,\nresRW29102OPT,resRW36102OPT,resRW37102OPT,resRW38102OPT,resRW39102OPT,resHC1x102OPT,resHC26102OPT,\nresHC27102OPT,resHC28102OPT,resHC29102OPT,resHC36102OPT,resHC37102OPT,resHC38102OPT,resHC39102OPT,\nresUR1x102OPT,resUR26102OPT,resUR27102OPT,resUR28102OPT,resUR29102OPT,resUR36102OPT,resUR37102OPT,\nresUR38102OPT,resUR39102OPT,resPIR2OPT,resSEQ2OPT,resSEQ22OPT)\n\nlinstance<-levels(res$instance)\n\nres.split<-split(1:nrow(res), list(res$instance, res$try, res$idalgo), drop=TRUE)\n\nmin.list <- lapply(res.split, function(x){\n        x[match(min(res$best[x]), res$best[x])]\n        })\n\nmin.vector <- unlist(min.list)\n\nbestalgo<-res[min.vector,]\n\nbestalgo.split <- split(1:nrow(bestalgo), bestalgo$instance, drop=TRUE)\n\nfor (i in (1:length(bestalgo.split)))\n{\n        bestalgo.vector <- unlist(bestalgo.split[i])\n        bestalgo.temp <- bestalgo[bestalgo.vector,]\n        l<-split(bestalgo.temp$best,bestalgo.temp$idalgo)\n\n        epsfile=paste(linstance[i],\"_100_nolim.eps\",sep=\"\")\n        postscript(file=epsfile,onefile=TRUE,horizontal=TRUE)\n        par(mar=c(5,5,5,3),cex.axis=0.7,las=2,mgp=c(4, 1, 0))\n        title_plot=paste(\"100 iterations - instance \",linstance[i],sep=\"\")\n        boxplot(l,xlab=\"\",ylab=\"solution value\",names=c(levels(bestalgo$idalgo)),main=title_plot,\n                yaxt=\"n\",ylim=c(optimal_values[optimal_values$instance==linstance[i],]$optimum,max(bestalgo.temp$best)))\n        axis(2, seq(from=optimal_values[optimal_values$instance==linstance[i],]$optimum,to=max(bestalgo.temp$best),length.out=10))\n        abline(h=optimal_values[optimal_values$instance==linstance[i],]$optimum)\n        # draw an orizontal line at the y-level of the best-know solution value\n        grid(nx=0, ny=55,col=\"gray5\")\n        dev.off()\n}\n</pre>\n\n====Things to improve====\n\nUse a separate text file that contains all the id data on an algorithm (idalgo, topo,  schema, ls, type) to reduce the size of the results text files (for the QAP experiments I obtained something like 500MB of text results files, half of which are redundant data)\n<pre>\nresult.txt should look like:\nidalgo          cpu_id  instance        try     best    time    iteration\n^^^^^^                  ^^^^^^^^\nalgorithms.txt should look like:\nidalgo          topo    schema  ls      type    number_of_cpus \n^^^^^\n\ninstances.txt should look like:\ninstance       best-known-solution-value\n^^^^^^^^\n</pre>"
                    }
                ]
            },
            "1511": {
                "pageid": 1511,
                "ns": 0,
                "title": "Repository of scripts used by IRIDIA members",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "==Max's scripts==\n\nWhen testing different algorithms on some combinatorial optimization problem, I usually organize the data on my machine according to a same schema. Basically I create the following structure of directories to store sources, problem instances, output data, executables and scripts.\n<pre>\n+ main_project_folder\n|\n|-+ bin   (contains the executables of the algorithms)\n|\n|-+ instances   (contains the problem instances)\n|\n|-+ out   (contains the outputs of the trial)\n| |\n| |-+ algorithm1\n| | |\n| | |-+ instance1\n| | | \n| | |-+ instance2\n| |\n| |-+ algorithm2\n|   |\n|   |-+ instance1\n|   | \n|   |-+ instance2\n|\n|-+ sh   (contains the script to launch the experiments)\n|\n|-+ src   (contains the sources of the algorithms)\n| |\n| |-+ algorithm1\n| | \n| |-+ algorithm2\n|\n|-+ analysis    (contains the R script to boxplot the experimental data)\n</pre>\n\n\n\n===Boxplot of solution values by algorithm===\n\n[[Image:Tai100a 1000.png]]\n\nI organize the data in the following way:\n\nin the file '''optimal_values.txt''' I put the best-known solution values for the problem instances I'm testing\n<pre>\ninstance   optimum \nsko100a    152002 \nsko100e    149150 \ntai100a    21059006 \ntai100b    1185996137 \n</pre>\n\n\nin the files '''algorithms.txt''' I put the algorithms details\n<pre>\nidalgo          topo    schema  ls      type    number_of_cpus\nPIR-2opt        PIR     PIR     2       Par     2\nPIR-ts          PIR     PIR     3       Par     2\nSEQ-2opt        SEQ     SEQ     2       Par     2\nSEQ-ts          SEQ     SEQ     3       Par     2\nSEQ2-2opt       SEQ     SEQ     2       Par     2\nSEQ2-ts         SEQ     SEQ     3       Par     2\nHC.1.x.10-2opt  HC      1.x.10  2       Par     2\nHC.2.6.10-2opt  HC      2.6.10  2       Par     2\nHC.2.7.10-2opt  HC      2.7.10  2       Par     2\n</pre>\n\n\nin the files '''algorithm_factors_instance-size_cut-time.txt''' I record the history of the search of the algo for the instance\n<pre>\nidalgo          cpu_id  instance        try     best    time    iteration\nHC.1.x.10-2opt  0       sko100a         1       155254  0.35    1\nHC.1.x.10-2opt  0       sko100a         1       154162  0.35    1\nHC.1.x.10-2opt  0       sko100a         1       154050  0.35    1\nHC.1.x.10-2opt  0       sko100a         1       153684  2.69    8\nHC.1.x.10-2opt  0       sko100a         1       153508  3.24    10\nHC.1.x.10-2opt  0       sko100a         1       153396  3.24    10\nHC.1.x.10-2opt  0       sko100a         1       153344  3.24    10\nHC.1.x.10-2opt  0       sko100a         1       153092  3.52    11\nHC.1.x.10-2opt  0       sko100a         1       153062  3.75    12\n</pre>\n\nIn order to produce boxplots like the one above you can look at the R source used to produce it.  \n\n\n<pre>\noptimal_values<-read.table(\"optimal_values.txt\",header=TRUE)\n\nresPIR2OPT<-read.table(\"parallel_independent_2-opt_100_1000.txt\",header=TRUE)\nresSEQ2OPT<-read.table(\"sequential_2-opt_100_2000.txt\",header=TRUE)\nresSEQ22OPT<-read.table(\"sequential2_2-opt_100_1000.txt\",header=TRUE)\nresHC1x102OPT<-read.table(\"hc.1.x.10_2-opt_100_1000.txt\",header=TRUE)\nresHC26102OPT<-read.table(\"hc.2.6.10_2-opt_100_1000.txt\",header=TRUE)\nresHC27102OPT<-read.table(\"hc.2.7.10_2-opt_100_1000.txt\",header=TRUE)\nresHC28102OPT<-read.table(\"hc.2.8.10_2-opt_100_1000.txt\",header=TRUE)\nresHC29102OPT<-read.table(\"hc.2.9.10_2-opt_100_1000.txt\",header=TRUE)\nresHC36102OPT<-read.table(\"hc.3.6.10_2-opt_100_1000.txt\",header=TRUE)\nresHC37102OPT<-read.table(\"hc.3.7.10_2-opt_100_1000.txt\",header=TRUE)\nresHC38102OPT<-read.table(\"hc.3.8.10_2-opt_100_1000.txt\",header=TRUE)\nresHC39102OPT<-read.table(\"hc.3.9.10_2-opt_100_1000.txt\",header=TRUE)\nresRW1x102OPT<-read.table(\"rw.1.x.10_2-opt_100_1000.txt\",header=TRUE)\nresRW26102OPT<-read.table(\"rw.2.6.10_2-opt_100_1000.txt\",header=TRUE)\nresRW27102OPT<-read.table(\"rw.2.7.10_2-opt_100_1000.txt\",header=TRUE)\nresRW28102OPT<-read.table(\"rw.2.8.10_2-opt_100_1000.txt\",header=TRUE)\nresRW29102OPT<-read.table(\"rw.2.9.10_2-opt_100_1000.txt\",header=TRUE)\nresRW36102OPT<-read.table(\"rw.3.6.10_2-opt_100_1000.txt\",header=TRUE)\nresRW37102OPT<-read.table(\"rw.3.7.10_2-opt_100_1000.txt\",header=TRUE)\nresRW38102OPT<-read.table(\"rw.3.8.10_2-opt_100_1000.txt\",header=TRUE)\nresRW39102OPT<-read.table(\"rw.3.9.10_2-opt_100_1000.txt\",header=TRUE)\n\nres<-rbind(resRW1x102OPT,resRW26102OPT,resRW27102OPT,resRW28102OPT,resRW29102OPT,\nresRW36102OPT,resRW37102OPT,resRW38102OPT,resRW39102OPT,resHC1x102OPT,resHC26102OPT,\nresHC27102OPT,resHC28102OPT,resHC29102OPT,resHC36102OPT,resHC37102OPT,resHC38102OPT,\nresHC39102OPT,resPIR2OPT,resSEQ2OPT,resSEQ22OPT)\n\n\nlinstance<-levels(res$instance)\n\nres.split<-split(1:nrow(res), list(res$instance, res$try, res$idalgo), drop=TRUE)\n\nmin.list <- lapply(res.split, function(x){\n        x[match(min(res$best[x]), res$best[x])]\n        })\n\n# matches return the first among all the values with min best!!!\n# so is not the one with minimal time\n\nmin.vector <- unlist(min.list)\n\nbestalgo<-res[min.vector,]\n\nbestalgo.split <- split(1:nrow(bestalgo), bestalgo$instance, drop=TRUE)\n\nfor (i in (1:length(bestalgo.split)))\n{\n        bestalgo.vector <- unlist(bestalgo.split[i])\n        bestalgo.temp <- bestalgo[bestalgo.vector,]\n        l<-split(as.double(bestalgo.temp$best),bestalgo.temp$idalgo)\n\n        epsfile=paste(linstance[i],\"_1000.eps\",sep=\"\")\n        postscript(file=epsfile,onefile=TRUE,horizontal=TRUE)\n        par(mar=c(5,5,5,3),cex.axis=0.7,las=2,mgp=c(4, 1, 0))\n        title_plot=paste(\"2 CPU - 1000 iterations - instance \",linstance[i],sep=\"\")\n        boxplot(l,xlab=\"\",ylab=\"solution value\",names=c(levels(bestalgo$idalgo)),main=title_plot,\nyaxt=\"n\",ylim=c(min(min(bestalgo.temp$best),optimal_values[optimal_values$instance==linstance[i],]$optimum),\nmax(bestalgo.temp$best)))\n        axis(2, seq(from=min(min(bestalgo.temp$best),optimal_values[optimal_values$instance==linstance[i],]$optimum),\nto=max(bestalgo.temp$best),length.out=10))\n        abline(h=optimal_values[optimal_values$instance==linstance[i],]$optimum)\n        grid(nx=0, ny=55,col=\"gray5\")\n        dev.off()\n}\n</pre>"
                    }
                ]
            }
        }
    }
}