Background info

I'm a beginner in ML, let me start there. I'm trying to implement an intelligent system that can route a ticket (in a ticketing system), to the appropriate place based on a few parameters, 5-10.

How the algorithm should work

For example, ticket '1234' gets sent to 'accounting' by human, normally by reading the ticket description and title (finding keywords). The ML algorithm should learn where tickets go based on where similar (based on same keywords) tickets have gone before.

What I've tried

I implemented a very simple NN in JavaScript using the sigmoid function to predict discrete yes/no type of outputs. If I remove the sigmoid function, I could predict where the ticket should go, based on keywords turned into parameters, perhaps using linear regression.

The problem

I'm not sure how I can turn keywords into number parameters, (or vectors?), that can be fed into a simple linear regression implementation. With my limited knowledge, I'm not sure if linear regression is the way to go but it certainly sounds like it. Linear regression is also a simpler algorithm I'll be able to implement myself.

Is linear regression the way to go? How can I turn an arbitrary-length paragraph (ticket description) into meaningful keywords to be used by the algorithm?

Ideally this would be JavaScript, but I see no tags for JavaScript. Odd.

  • $\begingroup$ @"I see no tags for JavaScript" That is because here in Computer Science we deal with computer science questions, not programming questions (see our FAQ). For the latter there is Stack Overflow. $\endgroup$
    – dkaeae
    Mar 11, 2019 at 16:15
  • $\begingroup$ @dkaeae I see. However I had to post this question here as one of the top places for Machine Learning questions. Should this go somewhere else? $\endgroup$ Mar 11, 2019 at 16:18
  • $\begingroup$ Unless your question depends on using JavaScript or specifics thereof, it should be fine here. Though you might want to edit your question so that JS is only cursory mentioned (so it is clear you are not expecting to see JS code in answers). $\endgroup$
    – dkaeae
    Mar 11, 2019 at 16:20
  • $\begingroup$ @dkaeae, I think "Ideally this would be JavaScript..." will take care of that. Thanks for clarifying. $\endgroup$ Mar 11, 2019 at 16:22

1 Answer 1


Linear regression does not seem like the right tool here. This isn't a regression problem; it is a classification problem. Regression outputs a continuous number; you need to output a category (which place the ticket should be routed to; presumably there is a finite list of candidate places).

I would suggest that you learn about natural language processing. The very simplest thing you could try would be naive Bayes with bag-of-words features. Fair warning: I would not expect that you will get especially good results without a lot of knowledge of NLP (and maybe not even then); it's probably going to be challenging to find a good solution for your problem.

  • $\begingroup$ @WD Thanks for the reply. I don't think this should be THAT hard, considering you could program this with a traditional programming. Only it would be a lot more brittle. The relationship from a couple of parameters to a specific output, x -> y, looks like linear regression. But I'll research your suggestion on the ba-of-words technique. $\endgroup$ Mar 11, 2019 at 17:19
  • $\begingroup$ @CertainCarl, well, I confess I didn't expect that response to a question asking for help. You certainly are always free to ignore any answer or advice you get and try out whatever approach seems most promising. I've edited my answer to explain about regression vs classification. Perhaps this task will turn out to be easier than I am expecting; that would be wonderful. Happy explorations! $\endgroup$
    – D.W.
    Mar 11, 2019 at 18:13
  • $\begingroup$ @DW I didn't mean to sound ungrateful, I certainly said thanks. It's just your answer was too brief for me to understand how your suggestions would help my problem. I only got more questions now than answers, but again, your reply is appreciated and I understand this might not be to easy an task. $\endgroup$ Mar 11, 2019 at 20:03

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.