Which of the following function can be used to create balanced splits of the data?

[amp_mcq option1=”newDataPartition” option2=”createDataPartition” option3=”renameDataPartition” option4=”none of the mentioned” correct=”option1″]

The correct answer is A. newDataPartition.

The newDataPartition function creates a new partition of a data frame by randomly splitting the rows into two groups. The groups are of equal size, unless the specified fraction argument is used to specify a different split ratio.

The createDataPartition function creates a new partition of a data frame by randomly splitting the rows into two groups. The groups are not necessarily of equal size.

The renameDataPartition function renames the groups of a data frame that was created using the newDataPartition or createDataPartition function.

Therefore, the only function that can be used to create balanced splits of the data is newDataPartition.