<p dir="auto">I have 20 samples from 2 classes. 18 from class 0 and 2 from class 1. Class 0 has proportion 18/20 = .9 or 90% whereas class 1 has proportion 2/20 = .1 or 10%. So as this is stratified, we expect 10% of the samples should be from class 1 in the test split. But we see  0% data is drawn from class 1.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sklearn.model_selection import StratifiedShuffleSplit
X = np.array([[1, 2], [3, 4], [1, 2], [3, 4], [5,6], [1, 2], [3, 4], [1, 2], [3, 4], [5,6], [7,8], [1, 2], [3, 4], [1, 2], [3, 4], [5,6], [1, 2], [3, 4], [1, 2], [3, 4]])
y = np.array([0, 0 ,0 , 0, 0, 0, 0, 0, 1,  1, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0])
sss = StratifiedShuffleSplit(n_splits=3, test_size=0.2, random_state=0)

for train_index, test_index in sss.split(X, y):
    print(&quot;TRAIN:&quot;, train_index, &quot;TEST:&quot;, test_index)
    X_train, X_test = X[train_index], X[test_index]
    y_train, y_test = y[train_index], y[test_index]"><pre class="notranslate"><code class="notranslate">from sklearn.model_selection import StratifiedShuffleSplit
X = np.array([[1, 2], [3, 4], [1, 2], [3, 4], [5,6], [1, 2], [3, 4], [1, 2], [3, 4], [5,6], [7,8], [1, 2], [3, 4], [1, 2], [3, 4], [5,6], [1, 2], [3, 4], [1, 2], [3, 4]])
y = np.array([0, 0 ,0 , 0, 0, 0, 0, 0, 1,  1, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0])
sss = StratifiedShuffleSplit(n_splits=3, test_size=0.2, random_state=0)

for train_index, test_index in sss.split(X, y):
    print("TRAIN:", train_index, "TEST:", test_index)
    X_train, X_test = X[train_index], X[test_index]
    y_train, y_test = y[train_index], y[test_index]
</code></pre></div>
<p dir="auto"><strong>Output:</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TRAIN: [10  9  3  7  1 12 16 15 13 11  4  6 19  8 18  2] TEST: [ 5 17  0 14]
TRAIN: [ 5 11  8 14 12 18  4 19 13  9 17  6  1 10  2 15] TEST: [ 0 16  3  7]
TRAIN: [14  2  0 16 10  8 15  1  5 18 12 19 17 11  9  4] TEST: [ 3 13  6  7]"><pre class="notranslate"><code class="notranslate">TRAIN: [10  9  3  7  1 12 16 15 13 11  4  6 19  8 18  2] TEST: [ 5 17  0 14]
TRAIN: [ 5 11  8 14 12 18  4 19 13  9 17  6  1 10  2 15] TEST: [ 0 16  3  7]
TRAIN: [14  2  0 16 10  8 15  1  5 18 12 19 17 11  9  4] TEST: [ 3 13  6  7]
</code></pre></div>
<h3 dir="auto">Describe the issue linked to the documentation</h3>
<p dir="auto">Since <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="946265329" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/20543" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/20543/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/20543">#20543</a> images linked in <code class="notranslate">manifold.rst</code> are no longer generated in the <a href="https://scikit-learn.org/stable/auto_examples/manifold/plot_lle_digits.html#sphx-glr-auto-examples-manifold-plot-lle-digits-py" rel="nofollow">example</a>.<br>
This generates multiple warnings in the documentation build.<br>
See also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1096757596" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/22147" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/22147/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/22147">#22147</a>.<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/thomasjpfan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/thomasjpfan">@thomasjpfan</a> , <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/glemaitre/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/glemaitre">@glemaitre</a> .</p>
<h3 dir="auto">Suggest a potential alternative/fix</h3>
<p dir="auto"><em>No response</em></p>