title: Recommendation Engine with PHP-ML and regression
body: <p>I try to find out how to work with <a href="https://github.com/php-ai/php-ml" rel="nofollow noreferrer">PHP-ML</a> when i want to recommend some items to current customer. </p>
  
  <p>My dataset (numeration is only the number of the row): </p>
  
  <ol>
  <li>Product 1 was purchased together with Product 2</li>
  <li>Product 1 was purchased together with Product 2</li>
  <li>Product 1 was purchased together with Product 3</li>
  <li>Product 1 was purchased together with Product 2</li>
  <li>Product 2 was purchased together with Product 4</li>
  <li>Product Y.. was purchased together with Product X..</li>
  </ol>
  
  <p>As a customer i had bought in the past Product 1. So normally i would expect in my recommendation box product 2 because 3 people bought it together with product 1. </p>
  
  <p>I think i need here some regression algorythm which give me some correlation value between product X and product Y. </p>
  
  <p>I thought about the linear SVR algorythm but i have no idea how to train it? </p>
  
  <pre><code>// Step 1: Load the Dataset
  // Step 2: Prepare the Dataset
  // Step 3: Generate the training/testing Dataset
  $samples = [[1,2], [1,2], [1,3], [1,2], [2,4], [X,Y..]];
  $targets = [?, ?, ? , ? , ? , ?];
  
  $regression = new LeastSquares();
  // Step 4: Train the classifier
  $regression-&gt;train($samples, $targets);
  
  
  echo $regression-&gt;predict([1,2]);
  </code></pre>
  
  <p>In my mind i should get some value like 0.25 -> 25% percent of customers who bought product 1 also bought product 2. Then i could order my predictions and have the order in my recommendation box.
  My main question is, what should i use for train? Do I understand something completely wrong? </p>
  
  <p>Thank you</p>