简体   繁体   中英

Extract Patterns from the device log data

I am working on a project, in which we have to extract the patterns(User behavior) from the device log data. Device log contains different device actions with a timestamp like when the devices was switched on or when they was switched off.

For example:
When a person enters a room. He first switches on the light and then he 
switches on the fan or Whenever the temp is less than 20 C, he switches off
the AC.

I am thinking to use Bayesian Networks to extract these patterns.

  • Learn Bayes Network from data (using Weka or Netica).
  • Arcs in Bayes Network will give the patterns/dependencies among different devices.

    Is this the right approach ??

Edit: The chronological order between devices matters.

Is this the right approach?

There's many possible approaches, but here's a very simple and effective one that fits the domain:

Given the nature of the application, chronological order doesn't really matter, it doesn't matter if the Fan gets turned on before the Light eg

Also given that you can have eg a motion sensor to trigger a routine that reads the sensors, and perhaps a periodic temperature check, you can use the network below to act upon the extracted patterns (no need to complicate it further with chronological order and event tracking, we extract data to act upon, and event order in this domain isn't interesting)

For example: When a person enters a room. He first switches on the light and then he switches on the fan or Whenever the temp is less than 20 C, he switches off the AC.

Raw devices log might look something like this, T/F being True/False:

Person in room | Temperature | Light | Fan | AC
-----------------------------------------------
T              | 20          | T     | T   | T
T              | 19          | T     | T   | F
F              | 18          | F     | F   | F 

With sufficient samples you can train a model on the above, eg Naive bayes is not sensitive to irrelevant features/inputs, so eg if you look at my first raw table above that includes all the variables and try to predict AC , with sufficient data it will understand that some inputs are not very important or completely irrelevant

Or if you know how before hand what the Light , Fan , and AC depend on, eg we know Light isn't going to depend on Temperature , and that Fan and AC don't care if Light is turned on or not (they can operate even if the person is sleeping eg) so you can break it down like below:

在此处输入图片说明

Person in Room | Light 
----------------------
T              | T
F              | F

Person in Room | Temperature | Fan
----------------------------------
T              | 20          | T
F              | 25          | F

Person in room | Temperature | AC
---------------------------------
T              | 20          | T
T              | 19          | F
F              | 20          | F
F              | 19          | F

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM