rvalavi/blockCV

Using "predefined" argument inside "cv_spatial" function (help needed)

Closed this issue · 1 comments

Hello there,

I'm new to "blockCV", so please excuse my lack of knowledge.

I'm trying to discover "selection" methods within "cv_spatial" function. I found out how to use "checkerboard", "random" and "systematic" approaches but then, I stucked in "predefined" method.

There, I got this error and I know why.

Error in cv_spatial(x = castanea_points_extracted, column = "species", : The 'user_blocks' and 'folds_column' should be specified for 'predefined' selection

I need to use following arguments within the function:

user_blocks =
folds_column =
blocks =
foldsCOl =

however, I couldn't find any helpful example neither in a manual nor somewhere in the internet.

Can someone explain me what type of inputs should I enter to those arguments and
if I need to create them before, how am I gonna do that..

I'm sincerely thankful for your package and definitely gonna cite you on my phd thesis!

Regards,

Huseyin

Hi @ozgurhsyndgn

Thank you for your message and interest in blockCV.

That optional argument is used only when you have your own blocks and want to use your own fold numbers in each of the polygons. For example, if you have a polygon layer such as the following figure that has an attribute column with some numbers to be used as folds, you can use the polygon in user_blocks option and the name of the attribute column in the folds_column, then use selection = "predefined" to use that set of polygon blocks and fold numbers for you instead of generating new ones. In most cases that should just be ignored. But thank you for pointing that out. I try to improve the documentation or add an example in the vignette.

image