使用生成特征语言模型挖掘隐式特征。
feature-mining的Python项目详细描述
gflm:使用生成特征语言模型挖掘隐式特征
说明
这个包实现了一个用于挖掘隐式特征的生成特征语言模型。
输入如下:
- 文本数据集
- 一组预定义功能
计算如下:
- 数据上显式和隐式特征的映射
- 同时使用gflm-word和gflm-section算法
安装
pip install feature_mining
示例用法
Usage:
from feature_mining import FeatureMining
fm = FeatureMining()
fm.load_ipod(full_set=False)
fm.fit()
fm.predict()
Results:
- prediction using 'section': fm.gflm.gflm_section
- prediction using 'word': fm.gflm.gflm_word
Display result:
fm.section_features()
print(fm.gflm_section_result.sort_values(by=['gflm_section'], ascending=False)[['feature', 'section_text']].head(20))
基于以下文件创建的包
S.Karmaker Santu,P.Sondhi和C.Zhai,“从客户评论中挖掘隐含特征的生成特征语言模型”,第25届ACM国际信息和知识管理会议论文集-CIkm'16,2016。
pydocs(代码文档)
(为配色方案道歉-这是默认设置)
教程
请参阅jupyter笔记本教程https://github.com/nfreundlich/CS410_CourseProject/blob/dev/tutorial.ipynb
视频演示和教程
链接到youtube:https://www.youtube.com/watch?v=mjJHkyrkxHM
在PYPI上打包
https://pypi.org/project/feature-mining/
幻灯片
https://github.com/nfreundlich/CS410_CourseProject/blob/dev/docs/CS_410_GFLM_Slides.pdf
已知问题
未从gflm单词/句子中删除的明确功能: https://github.com/nfreundlich/CS410_CourseProject/issues/28