title: What's a good practice to construct a feature vector based on formulas?
body: <p>I am newbie to data mining, and currently I am thinking to construct feature vector based on a set of formulas.</p>
  
  <p>In particular, I have a number of data, each data is a formula, something like this:</p>
  
  <pre><code>Y = (x1 * 5) &gt;&gt; 4 + (x2 * 6)
  </code></pre>
  
  <p>Note that formulas are not very large. </p>
  
  <p>I basically want to extract a feature vector on the basis of each formula, and undertakes a classic k-mean clustering algorithm.</p>
  
  <p>However, I am trapped to generate a good feature vector from formulas.</p>
  
  <p>I can of course start from this :</p>
  
  <pre><code>(N_number_of_variable, N_number_of_const, N_number_of_operator)
  </code></pre>
  
  <p>But note that each formula is actually quite small, and actually I have many one variable formula, like this:</p>
  
  <pre><code>Y1 = X2
  Y2 = X3
  ....
  </code></pre>
  
  <p>So I guess the naive approach above might not be a good way to go.</p>
  
  <p>As I basically don't have experience on data mining project before, I am trying to ask whether there is a good way to build feature vector given my situation.? </p>
  
  <p>Am I clear? thank you!</p>
  
  <p>Dear all, I attached more data samples here:</p>
  
  <pre><code>reg8 - 4 - 4 - 4 - 4 - 12
  
  reg8 - 44
  
  reg8
  
  reg8 + 44
  
  reg8 - 4 - 4 - 20
  
  reg8
  
  reg8 + 24 + 4
  
  reg8
  
  reg8 + 60 + 4 + 4 + 4 + 4
  
  reg8
  
  reg8
  </code></pre>
  
  <p>What I want to do:</p>
  
  <p>Actually each symbolic formula above represents the semantic information of a CPU register when it is executing some CPU instructions.</p>
  
  <p>I want to identify a sequence of <strong>specific</strong> CPU instruction, by looking at (clustering) its corresponding symbolic formula. </p>
  
  <p>For example:</p>
  
  <p>If after clustering, symbolic formulas below have been clustered into one category:</p>
  
  <pre><code>reg8 + 60 + 4 + 4 + 4 + 4 
  reg8 + 24 + 4
  reg8 + 44
  </code></pre>
  
  <p>Then I will take a look at the ground truth, and check whether the corresponding instruction sequences are surely the specific instructions sequence I am looking for.  </p>