1
$\begingroup$

I'm working with a data set where the data is stored in a string such as AxByCyA where A, B and C are actions and v,w,x,y,z are times between the actions (each letter represents an interval of time). It's worth noting that B cannot occur without A, and C cannot occur without B, and C is the action I'm attempting to study (ie: I'd like to be able to predict whether a user will do C based on their prior actions).

I intend to create 2 clusters: people who do C and those who don't.

From this data set I build a training array to run the sci-kit (python) k-means algorithm on, containing the number of As, the number of Bs, the mean time between actions (calculated using the average of each interval) and the standard deviation between each interval.

This gives me an overall success rate of 82% on the test set, but is there anything I can do for more accuracy?

$\endgroup$
  • 1
    $\begingroup$ How many clusters are you using, and which meaning you give to them? $\endgroup$ – pasaba por aqui May 9 '18 at 9:32
  • 1
    $\begingroup$ @pasabaporaqui ah I'll add that to my post... 2 clusters, people who do C and those who do not $\endgroup$ – Jessica Chambers May 9 '18 at 9:35
  • 1
    $\begingroup$ First hint could be increase number of clusters, labeling them "C" or "not C". $\endgroup$ – pasaba por aqui May 9 '18 at 9:36
  • 1
    $\begingroup$ Which distance measure do you use in the classifier, and which one i the learning ? euclidean ? $\endgroup$ – pasaba por aqui May 9 '18 at 9:37
  • 1
    $\begingroup$ @pasabaporaqui I think it uses the euclidean distances, yeah... and adding more clusters did improve the result; how many clusters are too many? $\endgroup$ – Jessica Chambers May 9 '18 at 9:41
4
$\begingroup$

The usual parameters to adjust in a k-means:

  1. Number of clusters (recall many clusters can have same label).
  2. Distance definition (euclidean is the most basic, Gauss is an
    improvement)
  3. Selection of initial cluster positions.
  4. Data preprocessing (data normalization, ...)
$\endgroup$

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.