def get_out_extension(otype):
    if otype == 'numpybin':
        ext = au.numpyio_ext()
    elif otype == 'octave':
        ext = au.octaveio_ext()
    elif otype == 'svmperf':
        ext = au.svmperfio_ext()
    elif otype == 'arff':
        ext = au.wekaio_ext()
    else:
        err = 'Output method not recognised!'
        raise IOError(err)

    return ext
Esempio n. 2
0
def get_out_extension (otype):
    if   otype  == 'numpybin':
        ext = au.numpyio_ext()
    elif otype  == 'octave':
        ext = au.octaveio_ext()
    elif otype  == 'svmperf':
        ext = au.svmperfio_ext()
    elif otype  == 'arff':
        ext = au.wekaio_ext()
    else:
        err = 'get_out_extension: Extension type not supported: ' + otype
        raise Exception(err)

    return ext
def get_out_extension(otype):
    if otype == "numpybin":
        ext = au.numpyio_ext()
    elif otype == "octave":
        ext = au.octaveio_ext()
    elif otype == "svmperf":
        ext = au.svmperfio_ext()
    elif otype == "arff":
        ext = au.wekaio_ext()
    else:
        err = "Output method not recognised!"
        raise IOError(err)

    return ext
def set_filename(outdir, filename, otype):
    filename = outdir + os.path.sep + filename

    if otype == 'numpybin':
        filename += au.numpyio_ext()

    elif otype == 'octave':
        filename += au.octaveio_ext()

    elif otype == 'svmperf':
        filename += au.svmperfio_ext()

    elif otype == 'arff':
        filename += au.wekaio_ext()

    else:
        err = 'Output method not recognised!'
        raise IOError(err)

    return filename
def set_filename (outdir, filename, otype):
   filename = outdir + os.path.sep + filename

   if   otype  == 'numpybin':
      filename += au.numpyio_ext()

   elif otype  == 'octave':
      filename += au.octaveio_ext()

   elif otype  == 'svmperf':
      filename += au.svmperfio_ext()

   elif otype  == 'arff':
      filename += au.wekaio_ext()

   else:
      err = 'Output method not recognised!'
      raise IOError(err)

   return filename