"FacebookTopic(内置分类器)" (内置分类器)
"FacebookTopic(内置分类器)" (内置分类器)
决定脸书帖子的主题.
类别
范例
打开所有单元 关闭所有单元基本范例 (2)
使用 "FacebookTopic" 内置分类器检测脸书帖子的主题:
Classify["FacebookTopic", "I love eating carrots in the morning"]Classify["FacebookTopic", {"I bought a new computer", "happy birthday!", "this skirt looks nice"}]未识别的主题或语言会返回 Indeterminate:
Classify["FacebookTopic", {"what is this topic?", "qwe niowqe mwoei!"}]Classify["FacebookTopic", "Let's celeberate your new job", "TopProbabilities" -> 3]获取该分类器的 ClassifierFunction:
c = Classify["FacebookTopic"]c[{"what have you been doing with your life lately", "Let's celeberate your new job"}]范围 (1)
加载对应于内置分类器的 ClassifierFunction:
c = Classify["FacebookTopic"]使用 Information 获取可能的类:
Information[c, "Classes"]选项 (3)
ClassPriors (1)
使用自定义的 ClassPriors 限制可能的输出:
Classify["FacebookTopic", "Let's celeberate your new job", ClassPriors -> <|"SpecialOccasions" -> 0.5, "Leisure" -> 0.5|>]IndeterminateThreshold (1)
使用自定义的 IndeterminateThreshold:
Classify["FacebookTopic", "what have you been doing with your life lately", IndeterminateThreshold -> .5]UtilityFunction (1)
utility = Information[Classify["FacebookTopic"], "UtilityFunction"];修改效用函数,惩罚 "Weather" 被误分类为 "FoodAndDrink":
utility["Weather", "FoodAndDrink"] = -10.;Classify["FacebookTopic", "What does it mean when deserts freeze?", UtilityFunction -> utility]Classify["FacebookTopic", "What does it mean when deserts freeze?"]巧妙范例 (1)
topics = Classify["FacebookTopic", "what have you been doing with your life lately", "Probabilities"];使用 WordCloud 可视化结果:
WordCloud[topics]相关指南
-
▪
- 机器学习
历史
2018年引入 (11.3)