示例#1
0
        # set vd
        vd = {'pkg': 'Content in .pkl'}

        args.shell = True

    # Analyze ------------------------------------------------------------------------------------------------------
    if args.analyze:
        from src.analysis import Analysis

        if args.analyze == 'model':
            # This analyze the training results stored with each model in the .pkl
            if args.data:
                analysis = Analysis(p_data=args.data)
            else:
                analysis = Analysis(p_data=_d_model_)
            analysis.use_f1 = args.use_f1
            data = analysis.compile_batch_train_results()

            vd = {'data': 'Compiled training data (Pandas dataframe)'}

        if args.analyze == 'precision' and args.pred_data and args.pred_data is not 'param':
            # Generate a series of predictions with incremental rounding cutoff (greater precision)
            Analysis().step_precisions(d_out=args.out,
                                       model=m,
                                       data=m.datas[-1],
                                       predictions=res['pred'],
                                       evaluations=res['eval'])

    # Enable interaction \______________________________________________________________________________________________
    if args.shell:
        interact(var_desc=vd, local=locals())