예제 #1
0
 def __init__(self, mode, data_type, log_csv_path, feature_path,
              debug_limit):
     self.db = SimpleCourseDB()
     self.db.build()
     print 'finish build course DB!'
     FeatureExtractor.__init__(self, mode, data_type, log_csv_path,
                               feature_path, debug_limit)
예제 #2
0
 def __init__(self, data_type, mode, debug_limit):
     log_csv_path = '{0}/../data/{1}/log_{1}.csv'.format(
         base_dir, data_type)
     feature_path = '{0}/../data/feature/user_feature_{1}.csv'.format(
         base_dir, data_type)
     FeatureExtractor.__init__(self, mode, log_csv_path, feature_path,
                               debug_limit)
예제 #3
0
 def __init__(self,texts=None,n=16,step_size=1,k=100,kmeans_args = None):
     self.n = n
     self.step_size = step_size
     self.k = k
     self.kmeans=None
     self.kmeans_args = kmeans_args
     FeatureExtractor.__init__(self)
예제 #4
0
 def __init__(self, prefix='_p_', min_df=1, max_per=1.0, binarize=False, transform=None, replace_num='#',
              source=None, subdir=None, pseudotype=None, splits_file=None, stage='training', suffix='',
              lower=True, scale_factor=None):
     name = 'pkl'
     assert transform != 'tfidf'
     FeatureExtractor.__init__(self, name=name, prefix=prefix, min_df=min_df, max_per=max_per, binarize=binarize,
                               transform=transform, replace_num=replace_num, source=source, subdir=subdir,
                               pseudotype=pseudotype, splits_file=splits_file, stage=stage, suffix=suffix,
                               lower=lower, scale_factor=scale_factor)
예제 #5
0
 def __init__(self, mode, data_type, log_csv_path, feature_path, label_path, debug_limit):
     FeatureExtractor.__init__(self, mode, data_type, log_csv_path, feature_path, debug_limit)
     labels = {}
     with open(label_path, 'r') as r:
         for line in r:
             eid, dropout = line.strip().split(',')
             if str.isdigit(eid):
                 labels[int(eid)] = int(dropout)
     self.labels = labels
예제 #6
0
 def __init__(self, mode, data_type, log_csv_path, enrollment_path,
              label_path, module_path, feature_path, debug_limit):
     self.db = SimpleCourseDB(mode, data_type, log_csv_path,
                              enrollment_path, label_path, module_path,
                              feature_path, debug_limit)
     self.db.build()
     print 'finish build course DB!'
     log_csv_path = base_dir + '/../../data/log_train.csv'
     FeatureExtractor.__init__(self, mode, data_type, log_csv_path,
                               feature_path, debug_limit)
예제 #7
0
 def __init__(self, mode, data_type, log_csv_path, feature_path, label_path,
              debug_limit):
     FeatureExtractor.__init__(self, mode, data_type, log_csv_path,
                               feature_path, debug_limit)
     labels = {}
     with open(label_path, 'r') as r:
         for line in r:
             eid, dropout = line.strip().split(',')
             if str.isdigit(eid):
                 labels[int(eid)] = int(dropout)
     self.labels = labels
예제 #8
0
 def __init__(self, k, similarity_function):
     self.vocabulary = None
     self.k = k
     self.sim_function = similarity_function
     FeatureExtractor.__init__(self)
     self.featuresVec
예제 #9
0
    def __init__(self, mode, data_type, log_csv_path, module_path,
                 feature_path, debug_limit):

        self.module_db = load_modules(module_path)
        FeatureExtractor.__init__(self, mode, data_type, log_csv_path,
                                  feature_path, debug_limit)
 def __init__(self, mode, data_type, log_csv_path, feature_path, debug_limit):
     FeatureExtractor.__init__(self, mode, data_type, log_csv_path, feature_path, debug_limit)
 def __init__(self, mode, data_type, log_csv_path, feature_path,
              debug_limit):
     FeatureExtractor.__init__(self, mode, data_type, log_csv_path,
                               feature_path, debug_limit)
예제 #12
0
 def __init__(self, mode, data_type, log_csv_path, enrollment_path, label_path, module_path, feature_path, debug_limit):
     self.db = SimpleCourseDB(mode, data_type, log_csv_path, enrollment_path, label_path, module_path, feature_path, debug_limit)
     self.db.build()
     print 'finish build course DB!'
     log_csv_path = base_dir + '/../../data/log_train.csv'
     FeatureExtractor.__init__(self, mode, data_type, log_csv_path, feature_path, debug_limit)
예제 #13
0
 def __init__(self):
     FeatureExtractor.__init__(self)
예제 #14
0
 def __init__(self,n,num_words,common_vocabulary=None):
     self.n = n
     self.num_words = num_words
     self.common_vocabulary = common_vocabulary
     FeatureExtractor.__init__(self)
예제 #15
0
    def __init__(self, mode, data_type, log_csv_path, module_path, feature_path, debug_limit):

        self.module_db = load_modules(module_path)
        FeatureExtractor.__init__(self, mode, data_type, log_csv_path, feature_path, debug_limit)
예제 #16
0
 def __init__(self,sentance_length_range=None):
     self.sentance_length_range = sentance_length_range
     FeatureExtractor.__init__(self)
 def __init__(self, data_type, mode, debug_limit):
     log_csv_path = '{0}/../data/{1}/log_{1}.csv'.format(base_dir, data_type)
     feature_path = '{0}/../data/feature/enrollment_feature_{1}.csv'.format(base_dir, data_type)
     FeatureExtractor.__init__(self, mode, log_csv_path, feature_path, debug_limit)
예제 #18
0
 def __init__(self, mode, data_type, log_csv_path, feature_path, debug_limit):
     # self.db = SimpleCourseDB()
     # self.db.build()
     # print 'finish build course DB!'
     FeatureExtractor.__init__(self, mode, data_type, log_csv_path, feature_path, debug_limit)