  In many real world problems, the training data and test data have different
distributions. This situation is commonly referred as a dataset shift. The most
common settings for dataset shift often considered in the literature are {\em
covariate shift } and {\em target shift}. Importance weighting (IW) correction
is a universal method for correcting the bias present in learning scenarios
under dataset shift. The question one may ask is: does IW correction work
equally well for different dataset shift scenarios? By investigating the
generalization properties of the weighted kernel ridge regression (W-KRR) under
covariate and target shifts we show that the answer is negative, except when IW
is bounded and the model is wellspecified. In the latter cases, a minimax
optimal rates are achieved by importance weighted kernel ridge regression
(IW-KRR) in both, covariate and target shift scenarios. Slightly relaxing the
boundedness condition of the IW we show that the IW-KRR still achieves the
optimal rates under target shift while leading to slower rates for covariate
shift. In the case of the model misspecification we show that the performance
of the W-KRR under covariate shift could be substantially increased by
designing an alternative reweighting function. The distinction between
misspecified and wellspecified scenarios does not seem to be crucial in the
learning problems under target shift.
