predicting algorithm
hello
any hints on which method I could use to predict if a person will turn on light based on a list of previous actions?
I'd like to find patterns when other people are around too. For example, "if person2 is in a room and person1 comes, he doesn't turn the light on".
The system would be incrementally trained by guessing the action and comparing with the actual user action
Data sample:
personID, hour, minute, second, weekday, [enter/exit], [light turned on/off]
1,9,15,35,0,exit1,0
1,9,15,37,0,enter2,0
1,9,18,50,0,exit2,0
1,9,18,51,0,enter3,0
1,9,24,14,0,exit3,0
1,9,24,15,0,enter4,0
1,9,24,22,0,exit4,0
1,18,08,12,0,enter4,1
1,18,08,21,0,exit4,0
1,18,08,29,0,enter1,1
1,19,40,21,0,exit1,0
1,19,40,22,0,enter2,1
1,19,56,51,0,exit2,0
1,19,56,53,0,enter1,0
thanks,
Luis Fernando
Check out books and journals on "pattern recognition".
IMO, a simple decision tree based on information theory should work nicely, plus the strongest patterns will appear on top of the tree. On the other hand, you will have to maintain a larger "state", e.g. dont expect most pattern recognition system to remember/determine that a person X was in a room based on previous actions, thats a different problem.
I know there is a *lot* of PR systems based on chains of symbols, especially in the biological domain, but Im more familiar with the image-based ones, sorry.
IMO, a simple decision tree based on information theory should work nicely, plus the strongest patterns will appear on top of the tree. On the other hand, you will have to maintain a larger "state", e.g. dont expect most pattern recognition system to remember/determine that a person X was in a room based on previous actions, thats a different problem.
I know there is a *lot* of PR systems based on chains of symbols, especially in the biological domain, but Im more familiar with the image-based ones, sorry.
This is a huge topic. Some keywords to begin your research: "logistic regression", "probabilistic reasoning", "naive Bayes", "hidden Markov model".
And, oddly, this is one of the few times that it is appropriate to bring up NNs in this forum.
Wow.
Wow.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
in fact, my problem is to take patterns from a HISTORY of events, not from single events
for example, a complex rule I expect could be similar to "if person 1 exit sector 2 between 10:30:15 and 10:35:20 and was on sector 3 15 minutes ago and there's no other person on sector 5, he goes to sector 5 and turn on the light"
it there some algorithm that can analyze a log and take complex (maybe not so complex as this one) rule?
the algorithms I checked didn't help a lot, since they're mainly based on non-history events (for example, "playing tennis" based on weather, time of the day, etc... but not based on "if I played tennis last weekend on the same day")
thanks,
Luis Fernando
for example, a complex rule I expect could be similar to "if person 1 exit sector 2 between 10:30:15 and 10:35:20 and was on sector 3 15 minutes ago and there's no other person on sector 5, he goes to sector 5 and turn on the light"
it there some algorithm that can analyze a log and take complex (maybe not so complex as this one) rule?
the algorithms I checked didn't help a lot, since they're mainly based on non-history events (for example, "playing tennis" based on weather, time of the day, etc... but not based on "if I played tennis last weekend on the same day")
thanks,
Luis Fernando
Quote: Original post by kavelot
the algorithms I checked didn't help a lot, since they're mainly based on non-history events (for example, "playing tennis" based on weather, time of the day, etc... but not based on "if I played tennis last weekend on the same day")
thanks,
Luis Fernando
It has less to do with the intrinsec properties of the methods than how to use them.
To have events occur based on a history of events, there's no real AI neccessary, just good record keeping. For instance, if an event has happened (and you have a way of knowing the event occured) then you would keep track of it via some means (variables and saved data). To know if a list of events have happened, you check the data to for each event.
To produce an AI that reacts based on prior actions the AI itself has made, then you would look into Markov chains. Your history of events can then be kept as an array (or queue) and each entry in the Markov dictionary would be indexed via a subset of the past history. Each dictionary entry contains the list of actions to be performed (and maybe with with a chance of each happening).
To produce an AI that reacts based on prior actions the AI itself has made, then you would look into Markov chains. Your history of events can then be kept as an array (or queue) and each entry in the Markov dictionary would be indexed via a subset of the past history. Each dictionary entry contains the list of actions to be performed (and maybe with with a chance of each happening).
william bubel
Quote: Original post by kavelot
the algorithms I checked didn't help a lot, since they're mainly based on non-history events (for example, "playing tennis" based on weather, time of the day, etc... but not based on "if I played tennis last weekend on the same day")
They didn't mention light switches either. That doesn't mean they aren't applicable to light switches.
Just some quick questions that will help narrow down the key features of the problem...
Do you have data (as described in the original post) per sector?
Do you have information related to the connectivity of sectors?
Do you have data (as described in the original post) per sector?
Do you have information related to the connectivity of sectors?
I'd like to thank everybody for taking your time!
I'll be making all the comments on this post...
Inmate2993: the problem I find is that the event aren't exactly the same
for example, person A may come from work everyday around 6:30pm and turn the lights on, but some days he may come 6:35pm, other days 6:21pm, etc. I could try to use some stats to determine something like "I want a time interval where I'll be correct 90% of the times", but an algorithm like that won't make more complex rules (for example, "it just turn the lights on if there isn't a person on the sector for more than 8 minutes")
Steadtler and Sneftel: yes, sure. I thought about putting all the events where an action happened on a single row of, for instance, a Decision Tree
But I can't think of many other options... I'm new to the IA field; I'm not creative enough to use methods very different from the ways I see around.
Maybe if someone can say "THIS method may do very well for that" I can think more on it, but with so many options, I can't try to think of a way to use each one.
Timkin: Yes, in fact "enter1" means the signal "Person entered the sector 1"
I thought it would be a good idea to make "signals" because later I could add new signals like "turnShowerOn" and my algorithm would still works
so this also answer your question: you can know that, if person A exit2 and enter4, there's a direct path 2 <-> 4, but it would be better to not use this information, since I'd like to have "generic" signals
But... if that's the only way I can do it, I can try to adapt later for other signals
thanks,
Luis Fernando
I'll be making all the comments on this post...
Inmate2993: the problem I find is that the event aren't exactly the same
for example, person A may come from work everyday around 6:30pm and turn the lights on, but some days he may come 6:35pm, other days 6:21pm, etc. I could try to use some stats to determine something like "I want a time interval where I'll be correct 90% of the times", but an algorithm like that won't make more complex rules (for example, "it just turn the lights on if there isn't a person on the sector for more than 8 minutes")
Steadtler and Sneftel: yes, sure. I thought about putting all the events where an action happened on a single row of, for instance, a Decision Tree
But I can't think of many other options... I'm new to the IA field; I'm not creative enough to use methods very different from the ways I see around.
Maybe if someone can say "THIS method may do very well for that" I can think more on it, but with so many options, I can't try to think of a way to use each one.
Timkin: Yes, in fact "enter1" means the signal "Person entered the sector 1"
I thought it would be a good idea to make "signals" because later I could add new signals like "turnShowerOn" and my algorithm would still works
so this also answer your question: you can know that, if person A exit2 and enter4, there's a direct path 2 <-> 4, but it would be better to not use this information, since I'd like to have "generic" signals
But... if that's the only way I can do it, I can try to adapt later for other signals
thanks,
Luis Fernando
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement