def main(): option_parser, opts, args = parse_command_line_parameters(**script_info) if opts.show_metrics: print("Known metrics are: %s\n" \ % (', '.join(list_known_cup_metrics()),)) exit(0) almost_required_options = ['input_path', 'output_path'] for option in almost_required_options: if getattr(opts,option) == None: option_parser.error('Required option --%s omitted.' % option) if os.path.isfile(opts.input_path): try: f = open(opts.output_path, 'w') except IOError: exit("ioerror, couldn't create output file") f.close() single_file_cup(opts.input_path, opts.metrics, opts.output_path, opts.look_ahead, opts.alpha, opts.f_ratio, opts.ci_type) else: exit("io error, input path not valid. does it exist?")
def main(): option_parser, opts, args = parse_command_line_parameters(**script_info) if opts.show_metrics: print("Known metrics are: %s\n" % (', '.join(list_known_cup_metrics()), )) exit(0) almost_required_options = ['input_path', 'output_path'] for option in almost_required_options: if getattr(opts, option) is None: option_parser.error('Required option --%s omitted.' % option) if os.path.isfile(opts.input_path): try: f = open(opts.output_path, 'w') except IOError: exit("ioerror, couldn't create output file") f.close() single_file_cup(opts.input_path, opts.metrics, opts.output_path, opts.look_ahead) else: exit("io error, input path not valid. does it exist?")
def main(): option_parser, opts, args = parse_command_line_parameters(**script_info) if opts.show_metrics: print("Known metrics are: %s\n" % (", ".join(list_known_cup_metrics()),)) exit(0) almost_required_options = ["input_path", "output_path"] for option in almost_required_options: if getattr(opts, option) is None: option_parser.error("Required option --%s omitted." % option) if os.path.isfile(opts.input_path): try: f = open(opts.output_path, "w") except IOError: exit("ioerror, couldn't create output file") f.close() single_file_cup(opts.input_path, opts.metrics, opts.output_path, opts.look_ahead) else: exit("io error, input path not valid. does it exist?")
'--output_path', help='Output filepath to store the predictions. [default: %default]', type='new_path'), make_option( '-r', '--look_ahead', help='Number of unobserved, new colors necessary for prediction.' ' [default: %default]', default=25, type='int'), make_option( '-m', '--metrics', default='lladser_pe,lladser_ci', type='multiple_choice', mchoices=list_known_cup_metrics(), help='CUP metric(s) to use. A comma-separated list should' + ' be provided when multiple metrics are specified. [default: %default]' ), make_option('-s', '--show_metrics', action='store_true', dest="show_metrics", help='Show the available CUP metrics and exit.') ] def main(): option_parser, opts, args = parse_command_line_parameters(**script_info) if opts.show_metrics:
make_option( "-o", "--output_path", help="Output filepath to store the predictions. [default: %default]", type="new_path" ), make_option( "-r", "--look_ahead", help="Number of unobserved, new colors necessary for prediction." " [default: %default]", default=25, type="int", ), make_option( "-m", "--metrics", default="lladser_pe,lladser_ci", type="multiple_choice", mchoices=list_known_cup_metrics(), help="CUP metric(s) to use. A comma-separated list should" + " be provided when multiple metrics are specified. [default: %default]", ), make_option( "-s", "--show_metrics", action="store_true", dest="show_metrics", help="Show the available CUP metrics and exit.", ), ] def main(): option_parser, opts, args = parse_command_line_parameters(**script_info)
' [default: %default]', default=25, type='int'), make_option('-c', '--ci_type', help='Type of confidence interval. Choice of '+\ ", ".join(CI_TYPES) +' [default: %default]', default='ULCL', type='choice', choices=CI_TYPES), make_option('-a', '--alpha', help='Desired confidence level for CI prediction.'+ ' [default: %default]', default=0.95, type='float'), make_option('-f', '--f_ratio', help='Upper to lower bound ratio for CI prediction.' + ' [default: %default]', default=10.0, type='float'), make_option('-m', '--metrics', default='lladser_pe,lladser_ci', type='multiple_choice', mchoices=list_known_cup_metrics(), help='CUP metric(s) to use. A comma-separated list should' +\ ' be provided when multiple metrics are specified. [default: %default]'), make_option('-s', '--show_metrics', action='store_true', dest="show_metrics", help='Show the available CUP metrics and exit.'), ] def main(): option_parser, opts, args = parse_command_line_parameters(**script_info) if opts.show_metrics: print("Known metrics are: %s\n" \ % (', '.join(list_known_cup_metrics()),)) exit(0)