Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Machine learning 基于无标签机器学习的异常检测_Machine Learning_Training Data_Anomaly Detection - Fatal编程技术网

Machine learning 基于无标签机器学习的异常检测

Machine learning 基于无标签机器学习的异常检测,machine-learning,training-data,anomaly-detection,Machine Learning,Training Data,Anomaly Detection,我正在跟踪特定时间段内的多个信号,并将它们与时间戳关联,如下所示: t0 1 10 2 0 1 0 ... t1 1 10 2 0 1 0 ... t2 3 0 9 7 1 1 ... // pressed a button to change the mode t3 3 0 9 7 1 1 ... t4 3 0 8 7 1 1 ... // pressed button to adjust a certain characterstic like temperature (signal

我正在跟踪特定时间段内的多个信号,并将它们与时间戳关联,如下所示:

t0 1 10 2 0 1 0 ...
t1 1 10 2 0 1 0 ...
t2 3  0 9 7 1 1 ... // pressed a button to change the mode
t3 3  0 9 7 1 1 ...
t4 3  0 8 7 1 1 ... // pressed button to adjust a certain characterstic like temperature (signal 3)
其中t0为夯实印记,1为信号1的值,10为信号2的值,依此类推

在特定时间段内捕获的数据应视为正常情况。现在,应该从正常情况中检测到重要的派生。有了显著的推导,我并不是说一个信号值只是变为一个在跟踪阶段没有看到的值,而是说许多值的变化还没有相互关联。我不想硬编码规则,因为将来可能会添加或删除更多信号,并且可能会实现具有其他信号值的其他modi

这可以通过某种机器学习算法实现吗?如果出现一个小的派生,我希望算法首先将其视为对训练集的一个小更改,如果它在将来多次出现,则应该学习它。主要目标是检测更大的变化/异常


我希望我能详细解释我的问题。提前感谢。

您只需计算特征空间中的最近邻,并设置一个阈值,将其与测试点的距离设置为非异常

假设在特定的时间段内有100个值

因此,您使用一个100维的特征空间和您的训练数据,其中不包含异常

如果获得要测试的新数据集,则计算k个最近邻并计算特征空间中的欧几里德距离

如果该距离大于某个阈值,则为异常。 为了优化,您必须做的是找到一个好的k和一个好的阈值。例如,通过网格搜索

请注意,只有当您的数据有固定的起点和终点时,这种方法才可能有效。否则,您将需要大量的数据,甚至比它的性能都不好

2注意,应该为您在问题中提到的每种模式创建一个自己的检测器