It seems that k-fold cross validation in convn net is not taken seriously due to huge running time of the neural network. I have a small data-set and I am interested in doing k-fold cross validation using the example given here. Is it possible? Thanks.
K fold cross validation using keras
13.4k Views Asked by motiur At
1
There are 1 best solutions below
Related Questions in KERAS
- Keras similarity calculation. Enumerating distance between two tensors, which indicates as lists
- How to predict input parameters from target parameter in a machine learning model?
- What is the alternative to module: tf.keras.preprocessing?
- My MSE and MAE are low, but my R2 is not good, how to improve it?
- No module named 'keras.layers.core
- AttributeError: 'Sequential' object has no attribute 'predict_classes'. Did you mean: 'predict_step'?
- AttributeError: module 'keras._tf_keras.keras.layers' has no attribute 'experimental'
- Error while loading .keras model: Layer node index out of bounds
- prediction model with python tensorflow and keras, gives error when predicting
- Recommended way to use Gymnasium with neural networks to avoid overheads in model.fit and model.predict
- Keras OCR - Getting different results from Keras
- No gradients provided for any variable in R
- Error Encountered: InvalidArgumentError: Graph execution error using Keras and Transformers
- How to import logsumexp from keras.backend?
- Keras predict/predict_on_batch giving different answers than predict_step/__call__()
Related Questions in CROSS-VALIDATION
- Get fitted estimator from CV function of XGBoost
- Solving R fatal error when using loo with GAM
- How to adapt lgb.cv in my k-folds splitting way?
- Why do I get the same results with different cross-validation specifications in caret for `lm`
- fbprophet how to adapt the date of my data to the prediction date and cross-validation
- Cross validation and/or train_test_split in scikit-learn?
- How to weight samples with sklearns's cross_validate for scoring only?
- Argument of length 0" during cross-validation in R
- ValueError: could not convert string to float: 'Curtis RIngraham Directge'
- Time Series Cross Validation Warning (tidymodels, fit_resamples)
- Problems with building a custom cv splitter for sklearn
- TypeError: Singleton array in nested stratified cross-validation
- Is there a proper way to apply median imputation by groups in caret?
- Key Error when Implementing Cross Validation with GroupKFold
- fabletools: Using forecast function on stretching window using external regressors
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you are using images with data generators, here's one way to do 10-fold cross-validation with Keras and scikit-learn. The strategy is to copy the files to
training,validation, andtestsubfolders according to each fold.In your predict() function, if you are using a data generator, the only way I could find to keep the predictions in the same order when testing was to use a
batch_sizeof1:With this code, I was able to do 10-fold cross-validation using data generators (so I did not have to keep all files in memory). This can be a lot of work if you have millions of images and the
batch_size = 1could be a bottleneck if your test set is large, but for my project this worked well.