예제 #1
0
#!/usr/bin/env python

import sys
import re

import combine_multiple_experiments


def detailsExtractor(dirName):
    regex = re.compile(ur'10fold_cv-(\d{1,2})')
    match = regex.match(dirName)
    assert match
    run = match.group(1)
    return [run]

if __name__ == '__main__':
    combine_multiple_experiments.main(sys.argv[1], ["run"],
                                      detailsExtractor,
                                      dirPattern='10fold_cv-*')
#!/usr/bin/env python

import sys
import re
import combine_multiple_experiments


def detailsExtractor(dirName):
    # affordable_useful_35182.txt-c5000-p1.
    # out.sentiws.clusters_over_10_8sb.
    # numHid_25_batchSize_22/
    regexS = ur'(.*)\.out\.'
    regexS += ur'(.*)\.clusters_over_(\d{1,2})_(\d{1,2})sb\.'
    regexS += ur'numHid_25_batchSize_22'
    regex = re.compile(regexS)
    match = regex.match(dirName)
    assert match
    clusterSource = match.group(1)
    div = match.group(2)
    threshold = match.group(3)
    bits = match.group(4)
    return [clusterSource, threshold, bits, div]


if __name__ == '__main__':
    headers = ['Cluster Source', 'Freq Threshold',
               'Significant Bits', 'Div Source']
    combine_multiple_experiments.main(sys.argv[1], headers,
                                      detailsExtractor,
                                      rejectPattern=re.compile(ur'.*\.rntn'))
예제 #3
0
#!/usr/bin/env python

import sys
import combine_multiple_experiments


def detailsExtractor(dirName):
    return dirName

if __name__ == '__main__':
    combine_multiple_experiments.main(sys.argv[1], ['source'],
                                      detailsExtractor,
                                      dirPattern='folds*')
예제 #4
0
#!/usr/bin/env python

import sys
import combine_multiple_experiments
import re


def detailsExtractor(dirName):
    # german_sentiment_treebank_592_beta_splits.numHid_33_batchSize_20.rntn
    dirRegEx = re.compile(ur'(.*)\.numHid_(\d\d)_batchSize_(\d\d)\.rntn')
    match = dirRegEx.match(dirName)
    assert match
    source = match.group(1)
    numHid = match.group(2)
    batchSize = match.group(3)
    return [source, numHid, batchSize]


if __name__ == "__main__":
    header = ["source", "numHid", "batchSize"]
    combine_multiple_experiments.main(sys.argv[1], header, detailsExtractor)
예제 #5
0
#!/usr/bin/env python

import sys
import re
import combine_multiple_experiments


def detailsExtractor(dirName):
    # vanilla_GST_WEIGHT_1.numHid_25_batchSize_22
    regexS = ur'vanilla_GST_WEIGHT_(\d{1,2})\.numHid_25_batchSize_22\.rntn'
    regex = re.compile(regexS)
    match = regex.match(dirName)
    assert match
    return [match.group(1)]

if __name__ == '__main__':
    combine_multiple_experiments.main(sys.argv[1], ['weight'],
                                      detailsExtractor,
                                      dirPattern='*rntn')
예제 #6
0
#!/usr/bin/env python

import sys
import combine_multiple_experiments


def detailsExtractor(dirName):
    return [dirName]

if __name__ == '__main__':
    combine_multiple_experiments.main(sys.argv[1], ['desc'],
                                      detailsExtractor)
예제 #7
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import re
import sys
import combine_multiple_experiments


def detailsExtractor(dirName):
    regex = re.compile(ur'thesis-final-ensemble-gst-top(\d{1})')
    match = regex.match(dirName)
    assert match
    run = match.group(1)
    return [run]

if __name__ == '__main__':
    runRE = re.compile(ur'thesis-final-ensemble-gst-top(\d{1})')
    globPattern = 'thesis-final-ensemble-gst-top?'
    combine_multiple_experiments.main(sys.argv[1], ['run'], detailsExtractor,
                                      dirPattern=globPattern)
예제 #8
0
#!/usr/bin/env python

import sys
import combine_multiple_experiments
import re


def detailsExtractor(dirName):
    # german_sentiment_treebank_592_beta_splits.affordable_useful_35182.txt-c5000-p1.out.clusters_over_10_17sb
    dirRegEx = re.compile(ur'(.*)\.clusters_over_(\d{1,2})_(\d{1,2})sb\.rntn')
    match = dirRegEx.match(dirName)
    print dirName
    assert match
    source = match.group(1)
    threshold = match.group(2)
    sb = match.group(3)
    return [source, threshold, sb]


if __name__ == "__main__":
    header = ["source", "threshold", "sb"]
    combine_multiple_experiments.main(sys.argv[1], header, detailsExtractor,
                                      dirPattern='*.rntn')