title: Pass Embeddings to XGBoost
body: <p>I have a Dataset in this format:</p>
  <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; df
  output_vector         embeddings
  [0,0,0..,1,0]         [0.05325024, 0.0007640972, -0.013689577,..]
  [1,0,0,..,0,0]        [0.03359347, -0.008248041, 0.021704413,..]
  ....                  .....
  [0,0,..,0,0]          [0.0015752012, -0.015894204, -0.026277754]
  </code></pre>
  <p>In short, I have a dataframe with two columns.
  Column1 = Output Column, having 0 in all places, and 1 in the place where the output is true.</p>
  <p>Column2 is the Training column, which has embeddings of size (768,) generated using BERT.</p>
  <p>Now I want to train these embedings and output on a XGBoost Model. The code I have is the following</p>
  <pre class="lang-py prettyprint-override"><code>for i in range(self.epochs):
              for single_data in self.load_data():
                  self.clf = xgb.train(
                      {
                          &quot;learning_rate&quot;: 0.007,
                          &quot;update&quot;: &quot;refresh&quot;,
                          &quot;process_type&quot;: &quot;update&quot;,
                          &quot;refresh_leaf&quot;: True,
                          &quot;reg_alpha&quot;: 3,
                          &quot;silent&quot;: False,
                      },
                      dtrain=xgb.DMatrix(
                          enable_categorical=True,
                          data=single_data[&quot;embeddings&quot;],
                          label=single_data[&quot;output_vector&quot;],
                      ),
                      xgb_model=self.clf,
                  )
  </code></pre>
  <p>I have enable_categorical True in xgb.Dmatrix but I am still getting the error</p>
  <pre><code>ValueError: DataFrame.dtypes for data must be int, float, bool or category.  When
  categorical type is supplied, DMatrix parameter `enable_categorical` must
  be set to `True`.
  </code></pre>
  <p>How can I pass it to a XGBoost Classifier?</p>