I need to design an algorithm such that it handles the request for shift swapping.

The algorithm will recommend a list of people who are more likely to swap that shift with the person by analyzing previous data.

  • Can anyone list the techniques that will help me to do this or a good starting point?

I was thinking about training a Naive Bayes Classifier and using Mahaout for generating recommendation.

  • $\begingroup$ Welcome to AI! Did a minor edit for enhanced readability. $\endgroup$
    – DukeZhou
    May 14 '18 at 17:55

You might not even need a classifier.

I would devise a scoring function, based on analysis of the previous data you have. Each user gets a score based on features like

  • how many times in the past has this user swapped a shift with somebody else?
  • how many times has the user swapped with the current user?
  • how many times has the user swapped this particular shift?

For each criterion you add a number of points to the score; the second one might be weighted higher that the first one. Then the person with the highest score is most likely to switch shifts with your current user.

The main question is the design of the scoring function, but I don't think you'd need to go into all the overkill of setting up a classifier; just think which criteria would make someone more likely to swap, and encode them directly. This has the advantage that it's transparent, ie you can always see why someone got recommended, and you can tweak your scoring method if the results are not quite what you'd want. This is often hard to do with ML classifiers.

  • $\begingroup$ Hi Oliver, I understand your comment regarding overkill. Actually I started learning AI/ML recently, I thought the best way to grasp is to learn by building something and asking questions in the process, so I thought of above generic problem involving shift swapping, this will include many constraint like a cashier would only swap with other cashier and so on. So I was thinking to apply ML/AI to learn it. $\endgroup$
    – Paras
    May 15 '18 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.