# What machine learning technique I need to apply?

I have a unix shell data. Each session starts with <begin> and <end>. Between <begin> and <end>, the info contains users command in the shell session. From this data, I need to figure out how many users are on the system with probability.

For example, the is something like this:

<begin>
pwd
cd ~
<end>
<begin>
ls
vi
<end>
<begin>
cat
ls
pwd
<end>


I have put this data into this type of data frame:

  user  dat
1  elm
2 gzip
2  <1>
2   ls
2   ci
2   -l
2  <1>
2   ci
2   -l
2  <1>
2   ci
2   -l
2  <1>
2   ci
2   -l
2  <1>
2   ls
2   ls
2  <1>
2   ls


I need this dat to be like this:

user ls cd vi cat
1   5   0  0  0
2   3   2  5   6


etc,

any ideas how I would do this?

• This question is unclear. At the moment it seems there is no any connection between input data and the number of users. – sashkello Jan 22 '14 at 3:19