Nilearn: Balancing target classes and using 5kfolds in a linear SVM model

Dear Nilearners out there,

Superfun program - thank you to the developers for making this.

I am using Nilearn for a SVM linear kernel model.

I have a target which consists of 2 groups which are different in size.

I used a support vector machine with a linear kernel where I also used kfolds = 5, and specified:
svc = SVC(kernel=‘linear’, class_weights = ‘balanced’).

I want to check that this balancing of target groups occurs on each of the five folds or if there needs to be further specification to result in equally balanced groups being drawn randomly.

If no, suggestions on how to do this are most appreciated from a newbie.

Regards, Eunice

Oh pooparama I meant
class_weight not class_weights.