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.
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 theLight
e.g.Also given that you can have e.g. 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)
Raw devices log might look something like this, T/F being True/False:
With sufficient samples you can train a model on the above, e.g. Naive bayes is not sensitive to irrelevant features/inputs, so e.g. 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 irrelevantOr if you know how before hand what the
Light
,Fan
, andAC
depend on, e.g. we knowLight
isn't going to depend onTemperature
, and thatFan
andAC
don't care ifLight
is turned on or not (they can operate even if the person is sleeping e.g.) so you can break it down like below: