Going through a kaggle tutorial the now, while I get the basic idea of what it does, from looking at the output and reading up the documentation, I think I need confirmation of what is going on here:
predictors = ["Pclass", "Sex", "Age", "SibSp", "Parch", "Fare", "Embarked"]
kf = KFold(titanic.shape[0], n_folds=3, random_state=1)
predictions = []
for train, test in kf:
train_predictors = (titanic[predictors].iloc[train,:])
My main issue here is the last line with the iloc
function. The rest is just for context. It just splits the training data up?