Error using fit in sklearn for covariance estimation
<p>I have a variable <strong>xcin</strong> which contains data in form of an array . I am trying to fit this data using fit() present in GraphLassoCV . </p>

<p>Data present in xcin :</p>

<pre><code>[ 0.722    0.32202  0.70102  0.7414   0.18204  0.01132  0.171    0.723
  0.722    0.52605  0.70102  0.7414   0.29253  0.95     0.729    0.7414
  0.74999  0.7412   0.454    0.7414   0.15122  0.7414   0.65992  0.723
  0.70102  0.45209  0.521    0.7412   0.92412  0.01403  0.45203  0.723
  0.9303   0.454    0.74999  0.5232   0.6309   0.1712   0.7414   0.221
  0.70102  0.851    0.241    0.01122  0.749    0.749    0.24232  0.454
  0.80904  0.454    0.40106  0.74999  0.74999  0.17123  0.74999  0.7412
  0.271    0.7414   0.55204  0.7414   0.5259   0.7414   0.749    0.7414
  0.722    0.28133  0.9219   0.749    0.729    0.749    0.3311   0.45201
  0.9303   0.45201  0.722    0.6304   0.722    0.40106  0.45205  0.18109
  0.722    0.749    0.749    0.5259   0.40107  0.40106  0.36911  0.7414
  0.7412   0.74999  0.154    0.851    0.722    0.154    0.722    0.74999
  0.29253  0.729    0.7412   0.6309 ]
</code></pre>

<p>I tried using the following code : </p>

<pre><code>xcin =np.array([df['xcin']])/100000.0
# Learn a graphical structure from the correlations
edge_model = covariance.GraphLassoCV()
X = xcin.copy().T
X /= X.std(axis=0)
edge_model.fit(X)
</code></pre>

<p>But I am getting an error on edge_model.fit() line : </p>

<pre><code>ValueError: Found array with 1 feature(s) (shape=(100, 1)) while a minimum of 2 is required by GraphLassoCV.
</code></pre>

<p>Can someone explain how to resolve this . </p>

<p>I am trying to follow the approach as demonstrated here (<a href="http://scikit-learn.org/stable/auto_examples/applications/plot_stock_market.html#sphx-glr-auto-examples-applications-plot-stock-market-py" rel="nofollow noreferrer">http://scikit-learn.org/stable/auto_examples/applications/plot_stock_market.html#sphx-glr-auto-examples-applications-plot-stock-market-py</a> ) to generate a similar type of visualization . </p>