In leave-one-out or leave-p-out cross-validation, the value of k is equal to the number of data points in the training dataset. This means that the model is trained on all but one of the data points and tested on the single left out data point. This process is repeated for each data point, providing a highly accurate estimation of the model's performance on testing dataset, albeit at the cost of increased computational time.