Hello guys, maybe anyone can help me out here. I am running following validation code:
train_scores, valid_scores = validation_curve(estimator=pipeline, # estimator (pipeline) X=features, # features matrix y=target, # target vector param_name='pca__n_components', param_range=range(1,50), # test these k-values cv=5, # 5-fold cross-validation scoring='neg_mean_absolute_error') # use negative validation
in the same
.py file on different machines, which I would name
localhost and staging have both i7 cpus, localhost needs around 40s for the validation, staging needs around 13-14 seconds
In order to get more "trustworthy" numbers I dockerized the images and run them on the servers. Anyone has an idea why the speed is so different?
from sklearn.linear_model import LinearRegression model = LinearRegression() from sklearn.preprocessing import PolynomialFeatures poly_transformer = PolynomialFeatures(degree=2, include_bias=False) from sklearn.pipeline import Pipeline pipeline = Pipeline([('poly', poly_transformer), ('reg', model)])