textcnn_datahelpers.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:text-classification 作者: cahya-wirawan 项目源码 文件源码
def get_datasets_20newsgroup(subset='train', categories=None, shuffle=True, random_state=42):
    """
    Retrieve data from 20 newsgroups
    :param subset: train, test or all
    :param categories: List of newsgroup name
    :param shuffle: shuffle the list or not
    :param random_state: seed integer to shuffle the dataset
    :return: data and labels of the newsgroup
    """
    datasets = fetch_20newsgroups(subset=subset, categories=categories, shuffle=shuffle, random_state=random_state)
    return datasets
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号