Mongodb机器学习的概率查询

时间:2019-04-05 02:34:02

标签: mongodb

mongodb是否可以对机器学习进行概率查询?

例如,我有一个名为patterns的收藏集:

{_id : 'some object id', input: [0, 0], output: [0]},
{_id : 'some object id', input: [0, 1], output: [1]},
{_id : 'some object id', input: [1, 0], output: [1]},
{_id : 'some object id', input: [1, 1], output: [0]}

并且我有一些数据要与现有数据进行比较,例如: findProbability是一个示例运算符

db.patters.findProbability({input: [0, 0]}); //[0]
db.patters.findProbability({input: [0, 1]}); //[1]

或其他示例,我有收藏集colors

{input: { r: 0.03, g: 0.7, b: 0.5 }, output: { black: 1 }},
{input: { r: 0.16, g: 0.09, b: 0.2 }, output: { white: 1 }},
{input: { r: 0.5, g: 0.5, b: 1.0 }, output: { white: 1 }}

db.colors.findProbability({ input: { r: 1, g: 0.4, b: 0 } }); //{ white: 0.81, black: 0.18 }

请注意:这是brainjs的示例。

mongodb可以在查询或某些运算符中做到这一点吗?

谢谢

0 个答案:

没有答案