EXA remove warnings by setting n_quantiles in plot_transformed_target
@@ -138,7 +138,9 @@ target = np.array(dataset.feature_names) == "DIS"
X = dataset.data[:, np.logical_not(target)]
y = dataset.data[:, target].squeeze()
y_trans = quantile_transform(dataset.data[:, target],
- output_distribution='normal').squeeze()
+ n_quantiles=300,
+ output_distribution='normal',
+ copy=True).squeeze()
###############################################################################
# A :class:`sklearn.preprocessing.QuantileTransformer` is used such that the
@@ -184,7 +186,8 @@ ax0.set_ylim([0, 10])
regr_trans = TransformedTargetRegressor(
regressor=RidgeCV(),
- transformer=QuantileTransformer(output_distribution='normal'))
+ transformer=QuantileTransformer(n_quantiles=300,
+ output_distribution='normal'))
regr_trans.fit(X_train, y_train)
y_pred = regr_trans.predict(X_test)
