Main function that is called when DistanceClassifier is run on the command line

def main():
    """Main function that is called when DistanceClassifier is run on the command line"""
    parser = argparse.ArgumentParser(description='DistanceClassifier for classification based on distance measure in feature space.',
                                     add_help=False)

    parser.add_argument('INPUT_FILE', type=str, help='Data file to perform DistanceClassifier on; ensure that the class label column is labeled as "class".')

    parser.add_argument('-h', '--help', action='help', help='Show this help message and exit.')

    parser.add_argument('-is', action='store', dest='INPUT_SEPARATOR', default='\t',
                        type=str, help='Character used to separate columns in the input file.')

    parser.add_argument('-d', action='store', dest='D', default='mahalanobis',choices = ['mahalanobis','euclidean'],
                        type=str, help='Distance metric to use.')

    parser.add_argument('-v', action='store', dest='VERBOSITY', default=1, choices=[0, 1, 2],
                        type=int, help='How much information DistanceClassifier communicates while it is running: 0 = none, 1 = minimal, 2 = all.')

    parser.add_argument('-s', action='store', dest='RANDOM_STATE', default=0,
                        type=int, help='Random state for train/test split.')

    parser.add_argument('--version', action='version', version='DistanceClassifier {version}'.format(version=__version__),
                        help='Show DistanceClassifier\'s version number and exit.')

    args = parser.parse_args()

    if args.VERBOSITY >= 2:
        print('\nDistanceClassifier settings:')
        for arg in sorted(args.__dict__):
            print('{}\t=\t{}'.format(arg, args.__dict__[arg]))
        print('')

    input_data = pd.read_csv(args.INPUT_FILE, sep=args.INPUT_SEPARATOR)

    if 'Class' in input_data.columns.values:
        input_data.rename(columns={'Label': 'label'}, inplace=True)

    RANDOM_STATE = args.RANDOM_STATE if args.RANDOM_STATE > 0 else None
    #
    # training_indices, testing_indices = train_test_split(input_data.index,
    #                                                      stratify=input_data['label'].values,
    #                                                      train_size=0.75,
    #                                                      test_size=0.25,
    #                                                      random_state=RANDOM_STATE)
    #
    # training_features = input_data.loc[training_indices].drop('label', axis=1).values
    # training_classes = input_data.loc[training_indices, 'label'].values
    #
    # testing_features = input_data.loc[testing_indices].drop('label', axis=1).values
    # testing_classes = input_data.loc[testing_indices, 'label'].values

    # Run and evaluate DistanceClassifier on the training and testing data
    dc = DistanceClassifier(d = args.D)
    # dc.fit(training_features, training_classes)
    dc.fit(input_data.drop('label',axis=1).values, input_data['label'].values)
    print(dc.score(input_data.drop('label',axis=1).values, input_data['label'].values))