Update model_pool_construction.py

This commit is contained in:
DroidEvolver 2019-02-04 14:40:51 +08:00 committed by GitHub
parent 092513d19e
commit 821bf1ef60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,5 @@
''' '''
To use: python with_true_label_train.py --starting 2011 GOAL: generate the initial detection model for the starting year
GOAL: generate the original detection model for the starting year (applying all data from the starting year as training data)
''' '''
import numpy as np import numpy as np
import scipy import scipy
@ -23,12 +21,11 @@ import argparse
def main(): def main():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--starting', type=int, help='directory for initialization data') # to use = args.past parser.add_argument('--starting', type=int, help='directory for initialization data')
args = parser.parse_args() args = parser.parse_args()
starting_year = args.starting starting_year = args.starting
X_train,Y_train=load_svmlight_file(str(starting_year)) X_train,Y_train=load_svmlight_file(str(starting_year))
print 'X_train data shape' , type(X_train), X_train.shape print 'X_train data shape' , type(X_train), X_train.shape