<p>I want to make 8 fold cross validation from the dataset. The dataset is the musical onsets annotated which has txt format at each songs. </p>

<p><a href="https://i.sstatic.net/3bsjJ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3bsjJ.png" alt="enter image description here"></a></p>

<p>How to make the another folder like called splits (the name of folder) which is contains 8 fold of songs. Each fold will be written as a txt format.</p>

<p><a href="https://i.sstatic.net/rrELH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/rrELH.png" alt="enter image description here"></a></p>

<p><a href="https://i.sstatic.net/g2jpM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/g2jpM.png" alt="enter image description here"></a></p>

<p>I need some code references to make 8 fold like that. Do I need use sklearn Kfold? And how to save each song like stated in the third picture?</p>

<p>Thank you.</p>

CC BY-SA 4.0
2019-05-07T09:06:44.493Z
data science stack exchange will be a better fit for this question.
naive
CC BY-SA 4.0
2019-05-07T12:38:34.673Z
This is off topic here, but there is example code already in the documentation for sklearn's kfold: https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.KFold.html#sklearn.model_selection.KFold
John Doucette
<machine-learning>
N fold Cross Validation
Choirin Nisa
# N fold Cross Validation

(Asked by: username_0 on 2019-05-07)

I want to make 8 fold cross validation from the dataset. The dataset is the musical onsets annotated which has txt format at each songs.

[![enter image description here](https://i.sstatic.net/3bsjJ.png)](https://i.sstatic.net/3bsjJ.png)

How to make the another folder like called splits (the name of folder) which is contains 8 fold of songs. Each fold will be written as a txt format.

[![enter image description here](https://i.sstatic.net/rrELH.png)](https://i.sstatic.net/rrELH.png)

[![enter image description here](https://i.sstatic.net/g2jpM.png)](https://i.sstatic.net/g2jpM.png)

I need some code references to make 8 fold like that. Do I need use sklearn Kfold? And how to save each song like stated in the third picture?

Thank you.

**Tags:** machine-learning

> **Comments:**
> **username_1**: data science stack exchange will be a better fit for this question.  
> **username_2**: This is off topic here, but there is example code already in the documentation for sklearn's kfold: https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.KFold.html#sklearn.model_selection.KFold  

---

## 0 answers

