コード例 #1
0
 def __init__(self, data_path, model_path="./", name=""):
     self.name = name
     self.data_path = data_path
     self.model_path = model_path
     self.DesignMatrix = []
     self.TestMatrix = []
     self.X_train = []
     self.y_train = []  # not only train but general purpose too
     self.X_test = []
     self.y_test = []
     self.y_pred = []
     self.vectorizer = None
     self.feature_names = None
     self.chi2 = None
     self.mlModel = None
     self.F = Filter()
コード例 #2
0
 def __init__(self):
     self.path = config.basePath + config.microblog
     self.SentiModel = self.load_obj("_model")
     self.ch2 = self.load_obj("_feature_selector")
     self.vectorizer = self.load_obj("_vectorizer")
     self.filter = Filter()