当前位置: 首页>>代码示例>>Python>>正文


Python FeatureExtractor.__init__方法代码示例

本文整理汇总了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)
开发者ID:aerows,项目名称:NLP1-Project,代码行数:9,代码来源:kmeans_ngram.py

示例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)
开发者ID:dallascard,项目名称:guac,代码行数:11,代码来源:feature_extractor_pkl.py

示例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
开发者ID:numb3r3,项目名称:kdd2015,代码行数:11,代码来源:week_feature_extractor.py

示例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)
开发者ID:hellozgm,项目名称:kddcup2015,代码行数:6,代码来源:enrollment_feature_extractor.py

示例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)
开发者ID:numb3r3,项目名称:kdd2015,代码行数:6,代码来源:module_feature_extractor.py

示例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
开发者ID:aerows,项目名称:NLP1-Project,代码行数:8,代码来源:spectral_clustering.py

示例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)
开发者ID:numb3r3,项目名称:kdd2015,代码行数:4,代码来源:enrollment_feature_extractor.py

示例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)
开发者ID:aerows,项目名称:NLP1-Project,代码行数:5,代码来源:words_per_sentence.py

示例9: __init__

# 需要导入模块: from feature_extractor import FeatureExtractor [as 别名]
# 或者: from feature_extractor.FeatureExtractor import __init__ [as 别名]
 def __init__(self):
     FeatureExtractor.__init__(self)
开发者ID:aerows,项目名称:NLP1-Project,代码行数:4,代码来源:factor_stop_words.py

示例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)
开发者ID:aerows,项目名称:NLP1-Project,代码行数:7,代码来源:ngram_freq.py

示例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)
开发者ID:numb3r3,项目名称:kdd2015,代码行数:8,代码来源:course_feature_extractor.py


注:本文中的feature_extractor.FeatureExtractor.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。