本文整理汇总了Python中feature_extractor.FeatureExtractor.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python FeatureExtractor.__init__方法的具体用法?Python FeatureExtractor.__init__怎么用?Python FeatureExtractor.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类feature_extractor.FeatureExtractor
的用法示例。
在下文中一共展示了FeatureExtractor.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
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)
示例2: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
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)
示例3: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
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
示例4: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
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)
示例5: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
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)
示例6: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
def __init__(self, k, similarity_function):
self.vocabulary = None
self.k = k
self.sim_function = similarity_function
FeatureExtractor.__init__(self)
self.featuresVec
示例7: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
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)
示例8: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
def __init__(self,sentance_length_range=None):
self.sentance_length_range = sentance_length_range
FeatureExtractor.__init__(self)
示例9: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
def __init__(self):
FeatureExtractor.__init__(self)
示例10: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
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)
示例11: __init__
# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
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)