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)
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)
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)
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)
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
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)
def __init__(self, k, similarity_function): self.vocabulary = None self.k = k self.sim_function = similarity_function FeatureExtractor.__init__(self) self.featuresVec
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): FeatureExtractor.__init__(self)
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)
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)
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)