Nested-Cross-Validation
Nested-Cross-Validation copied to clipboard
Nested cross-validation for unbiased predictions. Can be used with Scikit-Learn, XGBoost, Keras and LightGBM, or any other estimator that implements the scikit-learn interface.
from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.cluster import KMeans,MiniBatchKMeans from sklearn.metrics import adjusted_rand_score import matplotlib.pyplot as plt import matplotlib.cm as cm from sklearn.decomposition import TruncatedSVD vectorizer = TfidfVectorizer( #min_df = 0.3,...
GridSearch and RandomSearch take way too long, therefor I prefer bayesian HPO ([Example picture between Grid, Random, Bayes HPO](https://www.kaggleusercontent.com/kf/12981074/eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0..4WqE0qF61wak2h-ylBJmcw.L8KDPmGUJSIVqbGpc2rny_-qNqbI0coSG2VJ9ZVfFMk2qLTjo6cM2VnjEKrnQQQRoYHC_PLGvHTEj18BcaqZOZhWPbmpfqbXFgbOOGDKuJCyPaS5Pdz4YMOS1pKLtlk4qGlgDdlvatNTAaTEaQi3LNw7RmnPhxdQiC3vqWgV0--5BO-zL7BtdV1GV-rupg4Ayp9HWJvyTuTfk48Sa2V4fHkjzoSTg2M6dXhlyBuore-5s6nXwnYhdQbeu1eC435NsRgDB2PAUNH2UHUnDaUw3jq4u7DR8n-uzCFeSP_QQU6qLZeT1UeeQjDF_iifUFMz_58iWGRSua3wo7F19-MKrO8Dpy1aMa95VSW9xLIojRkSIQ4pb_4tvLC9xbWi9b-c14Jj39bVNBvI-xYPQxKyiq-_YHiYNMn1FrzrNYXgsKlU-MeiLgH_UUynfiFJEThegttUIgIT4tKi3YdfIFO5dLsA0223813tmT-HkphvWuGxNifSZFEA0aI_jEfeoRnpYyLa9vUFAXCI1NBgeJmjsvn08RclBkLeTTsAYUFXN1bM-KwA_5H_dVPJAyTPRxci1bSXELa-a7qfNXS0N5WCrJJzHRbb1Yn7tCD_aye8eS07JFWmY2UinUNOKdlPsQS_bf_lBNJCXARMNbuWUHcxLEYVzAtkhElTkM68qr_weoA.rImTQCQjyrzN9YCPUSGYxg/__results___files/__results___25_0.png) - Source: https://www.kaggle.com/fanvacoolt/tutorial-on-hyperopt. Is there a way to use this package...
First of all, thank you very much for the work on this library, its much needed and looks very well maintained. Just wonder, what are the functional differences between using...
This is useful, if someone wants to use the model instead of the parameters, or if someone would want to deploy the model they get out of nested cross-validation.
Examples of neural networks (tensorflow with keras), scikit-learn estimators and other popular packages out there (XGBoost, LightGBM etc..)
Use this code to see why it won't work; matrices are of different dimensions. ```python def _predict_and_score(self, X_test, y_test): #XXX: Implement type_of_target(y) if(self.predict_proba): y_type = type_of_target(y_test) if(y_type in ('binary')): pred...