`Code 215: Database error. Setup search query failed - None`
Opened this issue · 0 comments
PGijsbers commented
The error is produced when running the following unit test: tests/test_runs/test_run_functions/test_run_functions.py::TestRun::test_run_and_upload_knn_pipeline
Stacktrace:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_run_functions.py:538: in _run_and_upload_classification
return self._run_and_upload(
test_run_functions.py:466: in _run_and_upload
run = self._perform_run(
test_run_functions.py:271: in _perform_run
run_ = run.publish()
..\..\openml\base.py:130: in publish
response_text = openml._api_calls._perform_api_call(
..\..\openml\_api_calls.py:91: in _perform_api_call
response = _read_url_files(url, data=data, file_elements=file_elements)
..\..\openml\_api_calls.py:282: in _read_url_files
response = _send_request(
..\..\openml\_api_calls.py:327: in _send_request
__check_response(response=response, url=url, file_elements=files)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = <Response [412]>, url = 'https://test.openml.org/api/v1/xml/run/'
file_elements = {'description': ('description.xml', '<oml:run xmlns:oml="http://openml.org/openml">\n\t<oml:task_id>96</oml:task_id>\n...33333333333333,0.6666666666666666,-,-\n0,0,0,370,0.16666666666666666,0.8333333333333334,-,-\n0,0,0,411,0.5,0.5,-,+\n')}
def __check_response(response, url, file_elements):
if response.status_code != 200:
> raise __parse_server_exception(response, url, file_elements=file_elements)
E openml.exceptions.OpenMLServerException: https://test.openml.org/api/v1/xml/run/ returned code 215: Database error. Setup search query failed - None
..\..\openml\_api_calls.py:377: OpenMLServerException
endpoint POST
: 'https://test.openml.org/api/v1/xml/flow/'
file elements:
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.pipeline.Pipeline(Imputer=sklearn.compose._column_transformer.ColumnTransformer(cat=sklearn.pipeline.Pipeline(simpleimputer=sklearn.impute._base.SimpleImputer,onehotencoder=sklearn.preprocessing._encoders.OneHotEncoder),cont=sklearn.pipeline.Pipeline(customimputer=openml.testing.CustomImputer,standardscaler=sklearn.preprocessing._data.StandardScaler)),VarianceThreshold=sklearn.feature_selection._variance_threshold.VarianceThreshold,Estimator=sklearn.model_selection._search.RandomizedSearchCV(estimator=sklearn.neighbors._classification.KNeighborsClassifier))</oml:name>
<oml:custom_name>sklearn.Pipeline(ColumnTransformer,VarianceThreshold,RandomizedSearchCV(KNeighborsClassifier))</oml:custom_name>
<oml:class_name>sklearn.pipeline.Pipeline</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Pipeline of transforms with a final estimator.
Sequentially apply a list of transforms and a final estimator.
Intermediate steps of the pipeline must be 'transforms', that is, they
must implement `fit` and `transform` methods.
The final estimator only needs to implement `fit`.
The transformers in the pipeline can be cached using ``memory`` argument.
The purpose of the pipeline is to assemble several steps that can be
cross-validated together while setting different parameters. For this, it
enables setting parameters of the various steps using their names and the
parameter name separated by a `'__'`, as in the example below. A step's
estimator may be replaced entirely by setting the parameter with its name
to another estimator, or a transformer removed by setting it to
`'passthrough'` or `None`.</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>memory</oml:name>
<oml:data_type>str or object with the joblib</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Used to cache the fitted transformers of the pipeline. By default,
no caching is performed. If a string is given, it is the path to
the caching directory. Enabling caching triggers a clone of
the transformers before fitting. Therefore, the transformer
instance given to the pipeline cannot be inspected
directly. Use the attribute ``named_steps`` or ``steps`` to
inspect estimators within the pipeline. Caching the
transformers is advantageous when fitting is time consuming</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>steps</oml:name>
<oml:data_type>list of tuple</oml:data_type>
<oml:default_value>[{"oml-python:serialized_object": "component_reference", "value": {"key": "Imputer", "step_name": "Imputer"}}, {"oml-python:serialized_object": "component_reference", "value": {"key": "VarianceThreshold", "step_name": "VarianceThreshold"}}, {"oml-python:serialized_object": "component_reference", "value": {"key": "Estimator", "step_name": "Estimator"}}]</oml:default_value>
<oml:description>List of (name, transform) tuples (implementing `fit`/`transform`) that
are chained in sequential order. The last transform must be an
estimator</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>verbose</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>false</oml:default_value>
<oml:description>If True, the time elapsed while fitting each step will be printed as it
is completed.</oml:description>
</oml:parameter>
<oml:component>
<oml:identifier>Imputer</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.compose._column_transformer.ColumnTransformer(cat=sklearn.pipeline.Pipeline(simpleimputer=sklearn.impute._base.SimpleImputer,onehotencoder=sklearn.preprocessing._encoders.OneHotEncoder),cont=sklearn.pipeline.Pipeline(customimputer=openml.testing.CustomImputer,standardscaler=sklearn.preprocessing._data.StandardScaler))</oml:name>
<oml:custom_name>sklearn.ColumnTransformer</oml:custom_name>
<oml:class_name>sklearn.compose._column_transformer.ColumnTransformer</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Applies transformers to columns of an array or pandas DataFrame.
This estimator allows different columns or column subsets of the input
to be transformed separately and the features generated by each transformer
will be concatenated to form a single feature space.
This is useful for heterogeneous or columnar data, to combine several
feature extraction mechanisms or transformations into a single transformer.</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>n_jobs</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Number of jobs to run in parallel
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>remainder</oml:name>
<oml:default_value>"drop"</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>sparse_threshold</oml:name>
<oml:data_type>float</oml:data_type>
<oml:default_value>0.3</oml:default_value>
<oml:description>If the output of the different transformers contains sparse matrices,
these will be stacked as a sparse matrix if the overall density is
lower than this value. Use ``sparse_threshold=0`` to always return
dense. When the transformed output consists of all dense data, the
stacked result will be dense, and this keyword will be ignored</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>transformer_weights</oml:name>
<oml:data_type>dict</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Multiplicative weights for features per transformer. The output of the
transformer is multiplied by these weights. Keys are transformer names,
values the weights</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>transformers</oml:name>
<oml:data_type>list of tuples</oml:data_type>
<oml:default_value>[{"oml-python:serialized_object": "component_reference", "value": {"key": "cat", "step_name": "cat", "argument_1": {"oml-python:serialized_object": "function", "value": "openml.extensions.sklearn.cat"}}}, {"oml-python:serialized_object": "component_reference", "value": {"key": "cont", "step_name": "cont", "argument_1": {"oml-python:serialized_object": "function", "value": "openml.extensions.sklearn.cont"}}}]</oml:default_value>
<oml:description>List of (name, transformer, columns) tuples specifying the
transformer objects to be applied to subsets of the data</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>verbose</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>false</oml:default_value>
<oml:description>If True, the time elapsed while fitting each transformer will be
printed as it is completed</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>verbose_feature_names_out</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>true</oml:default_value>
<oml:description>If True, :meth:`get_feature_names_out` will prefix all feature names
with the name of the transformer that generated that feature
If False, :meth:`get_feature_names_out` will not prefix any feature
names and will error if feature names are not unique
.. versionadded:: 1.0</oml:description>
</oml:parameter>
<oml:component>
<oml:identifier>cat</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.pipeline.Pipeline(simpleimputer=sklearn.impute._base.SimpleImputer,onehotencoder=sklearn.preprocessing._encoders.OneHotEncoder)</oml:name>
<oml:custom_name>sklearn.Pipeline(SimpleImputer,OneHotEncoder)</oml:custom_name>
<oml:class_name>sklearn.pipeline.Pipeline</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Pipeline of transforms with a final estimator.
Sequentially apply a list of transforms and a final estimator.
Intermediate steps of the pipeline must be 'transforms', that is, they
must implement `fit` and `transform` methods.
The final estimator only needs to implement `fit`.
The transformers in the pipeline can be cached using ``memory`` argument.
The purpose of the pipeline is to assemble several steps that can be
cross-validated together while setting different parameters. For this, it
enables setting parameters of the various steps using their names and the
parameter name separated by a `'__'`, as in the example below. A step's
estimator may be replaced entirely by setting the parameter with its name
to another estimator, or a transformer removed by setting it to
`'passthrough'` or `None`.</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>memory</oml:name>
<oml:data_type>str or object with the joblib</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Used to cache the fitted transformers of the pipeline. By default,
no caching is performed. If a string is given, it is the path to
the caching directory. Enabling caching triggers a clone of
the transformers before fitting. Therefore, the transformer
instance given to the pipeline cannot be inspected
directly. Use the attribute ``named_steps`` or ``steps`` to
inspect estimators within the pipeline. Caching the
transformers is advantageous when fitting is time consuming</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>steps</oml:name>
<oml:data_type>list of tuple</oml:data_type>
<oml:default_value>[{"oml-python:serialized_object": "component_reference", "value": {"key": "simpleimputer", "step_name": "simpleimputer"}}, {"oml-python:serialized_object": "component_reference", "value": {"key": "onehotencoder", "step_name": "onehotencoder"}}]</oml:default_value>
<oml:description>List of (name, transform) tuples (implementing `fit`/`transform`) that
are chained in sequential order. The last transform must be an
estimator</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>verbose</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>false</oml:default_value>
<oml:description>If True, the time elapsed while fitting each step will be printed as it
is completed.</oml:description>
</oml:parameter>
<oml:component>
<oml:identifier>simpleimputer</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.impute._base.SimpleImputer</oml:name>
<oml:custom_name>sklearn.SimpleImputer</oml:custom_name>
<oml:class_name>sklearn.impute._base.SimpleImputer</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Univariate imputer for completing missing values with simple strategies.
Replace missing values using a descriptive statistic (e.g. mean, median, or
most frequent) along each column, or using a constant value.</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>add_indicator</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>false</oml:default_value>
<oml:description>If True, a :class:`MissingIndicator` transform will stack onto output
of the imputer's transform. This allows a predictive estimator
to account for missingness despite imputation. If a feature has no
missing values at fit/train time, the feature won't appear on
the missing indicator even if there are missing values at
transform/test time</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>copy</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>true</oml:default_value>
<oml:description>If True, a copy of X will be created. If False, imputation will
be done in-place whenever possible. Note that, in the following cases,
a new copy will always be made, even if `copy=False`:
- If `X` is not an array of floating values;
- If `X` is encoded as a CSR matrix;
- If `add_indicator=True`</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>fill_value</oml:name>
<oml:data_type>str or numerical value</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>When strategy == "constant", `fill_value` is used to replace all
occurrences of missing_values. For string or object data types,
`fill_value` must be a string
If `None`, `fill_value` will be 0 when imputing numerical
data and "missing_value" for strings or object data types</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>keep_empty_features</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>false</oml:default_value>
<oml:description>If True, features that consist exclusively of missing values when
`fit` is called are returned in results when `transform` is called
The imputed value is always `0` except when `strategy="constant"`
in which case `fill_value` will be used instead
.. versionadded:: 1.2</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>missing_values</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>NaN</oml:default_value>
<oml:description>The placeholder for the missing values. All occurrences of
`missing_values` will be imputed. For pandas' dataframes with
nullable integer dtypes with missing values, `missing_values`
can be set to either `np.nan` or `pd.NA`</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>strategy</oml:name>
<oml:data_type>str</oml:data_type>
<oml:default_value>"most_frequent"</oml:default_value>
<oml:description>The imputation strategy
- If "mean", then replace missing values using the mean along
each column. Can only be used with numeric data
- If "median", then replace missing values using the median along
each column. Can only be used with numeric data
- If "most_frequent", then replace missing using the most frequent
value along each column. Can be used with strings or numeric data
If there is more than one such value, only the smallest is returned
- If "constant", then replace missing values with fill_value. Can be
used with strings or numeric data
.. versionadded:: 0.20
strategy="constant" for fixed value imputation</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>verbose</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>"deprecated"</oml:default_value>
<oml:description>Controls the verbosity of the imputer
.. deprecated:: 1.1
The 'verbose' parameter was deprecated in version 1.1 and will be
removed in 1.3. A warning will always be raised upon the removal of
empty columns in the future version</oml:description>
</oml:parameter>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:component>
<oml:identifier>onehotencoder</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.preprocessing._encoders.OneHotEncoder</oml:name>
<oml:custom_name>sklearn.OneHotEncoder</oml:custom_name>
<oml:class_name>sklearn.preprocessing._encoders.OneHotEncoder</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Encode categorical features as a one-hot numeric array.
The input to this transformer should be an array-like of integers or
strings, denoting the values taken on by categorical (discrete) features.
The features are encoded using a one-hot (aka 'one-of-K' or 'dummy')
encoding scheme. This creates a binary column for each category and
returns a sparse matrix or dense array (depending on the ``sparse_output``
parameter)
By default, the encoder derives the categories based on the unique values
in each feature. Alternatively, you can also specify the `categories`
manually.
This encoding is needed for feeding categorical data to many scikit-learn
estimators, notably linear models and SVMs with the standard kernels.
Note: a one-hot encoding of y labels should use a LabelBinarizer
instead.</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>categories</oml:name>
<oml:data_type>'auto' or a list of array</oml:data_type>
<oml:default_value>"auto"</oml:default_value>
<oml:description>Categories (unique values) per feature:
- 'auto' : Determine categories automatically from the training data
- list : ``categories[i]`` holds the categories expected in the ith
column. The passed categories should not mix strings and numeric
values within a single feature, and should be sorted in case of
numeric values
The used categories can be found in the ``categories_`` attribute
.. versionadded:: 0.20
drop : {'first', 'if_binary'} or an array-like of shape (n_features,), default=None
Specifies a methodology to use to drop one of the categories per
feature. This is useful in situations where perfectly collinear
features cause problems, such as when feeding the resulting data
into an unregularized linear regression model
However, dropping one category breaks the symmetry of the original
representation and can therefore induce a bias in downstream models,
for instance for penalized linear classification or regression models</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>drop</oml:name>
<oml:default_value>null</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>dtype</oml:name>
<oml:data_type>number type</oml:data_type>
<oml:default_value>{"oml-python:serialized_object": "type", "value": "np.float64"}</oml:default_value>
<oml:description>Desired dtype of output
handle_unknown : {'error', 'ignore', 'infrequent_if_exist'}, default='error'
Specifies the way unknown categories are handled during :meth:`transform`
- 'error' : Raise an error if an unknown category is present during transform
- 'ignore' : When an unknown category is encountered during
transform, the resulting one-hot encoded columns for this feature
will be all zeros. In the inverse transform, an unknown category
will be denoted as None
- 'infrequent_if_exist' : When an unknown category is encountered
during transform, the resulting one-hot encoded columns for this
feature will map to the infrequent category if it exists. The
infrequent category will be mapped to the last position in the
encoding. During inverse transform, an unknown category will be
mapped to the category denoted `'infrequent'` if it exists. If the
`'infrequent'` category does not exist, then :meth:`transform` and
...</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>handle_unknown</oml:name>
<oml:default_value>"ignore"</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>max_categories</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Specifies an upper limit to the number of output features for each input
feature when considering infrequent categories. If there are infrequent
categories, `max_categories` includes the category representing the
infrequent categories along with the frequent categories. If `None`,
there is no limit to the number of output features
.. versionadded:: 1.1
Read more in the :ref:`User Guide <one_hot_encoder_infrequent_categories>`.</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>min_frequency</oml:name>
<oml:data_type>int or float</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Specifies the minimum frequency below which a category will be
considered infrequent
- If `int`, categories with a smaller cardinality will be considered
infrequent
- If `float`, categories with a smaller cardinality than
`min_frequency * n_samples` will be considered infrequent
.. versionadded:: 1.1
Read more in the :ref:`User Guide <one_hot_encoder_infrequent_categories>`</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>sparse</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>"deprecated"</oml:default_value>
<oml:description>Will return sparse matrix if set True else will return an array
.. deprecated:: 1.2
`sparse` is deprecated in 1.2 and will be removed in 1.4. Use
`sparse_output` instead</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>sparse_output</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>true</oml:default_value>
<oml:description>Will return sparse matrix if set True else will return an array
.. versionadded:: 1.2
`sparse` was renamed to `sparse_output`</oml:description>
</oml:parameter>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:component>
<oml:identifier>cont</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.pipeline.Pipeline(customimputer=openml.testing.CustomImputer,standardscaler=sklearn.preprocessing._data.StandardScaler)</oml:name>
<oml:custom_name>sklearn.Pipeline(CustomImputer,StandardScaler)</oml:custom_name>
<oml:class_name>sklearn.pipeline.Pipeline</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Pipeline of transforms with a final estimator.
Sequentially apply a list of transforms and a final estimator.
Intermediate steps of the pipeline must be 'transforms', that is, they
must implement `fit` and `transform` methods.
The final estimator only needs to implement `fit`.
The transformers in the pipeline can be cached using ``memory`` argument.
The purpose of the pipeline is to assemble several steps that can be
cross-validated together while setting different parameters. For this, it
enables setting parameters of the various steps using their names and the
parameter name separated by a `'__'`, as in the example below. A step's
estimator may be replaced entirely by setting the parameter with its name
to another estimator, or a transformer removed by setting it to
`'passthrough'` or `None`.</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>memory</oml:name>
<oml:data_type>str or object with the joblib</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Used to cache the fitted transformers of the pipeline. By default,
no caching is performed. If a string is given, it is the path to
the caching directory. Enabling caching triggers a clone of
the transformers before fitting. Therefore, the transformer
instance given to the pipeline cannot be inspected
directly. Use the attribute ``named_steps`` or ``steps`` to
inspect estimators within the pipeline. Caching the
transformers is advantageous when fitting is time consuming</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>steps</oml:name>
<oml:data_type>list of tuple</oml:data_type>
<oml:default_value>[{"oml-python:serialized_object": "component_reference", "value": {"key": "customimputer", "step_name": "customimputer"}}, {"oml-python:serialized_object": "component_reference", "value": {"key": "standardscaler", "step_name": "standardscaler"}}]</oml:default_value>
<oml:description>List of (name, transform) tuples (implementing `fit`/`transform`) that
are chained in sequential order. The last transform must be an
estimator</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>verbose</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>false</oml:default_value>
<oml:description>If True, the time elapsed while fitting each step will be printed as it
is completed.</oml:description>
</oml:parameter>
<oml:component>
<oml:identifier>customimputer</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0openml.testing.CustomImputer</oml:name>
<oml:custom_name>openml.CustomImputer</oml:custom_name>
<oml:class_name>openml.testing.CustomImputer</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Duplicate class alias for sklearn's SimpleImputer
Helps bypass the sklearn extension duplicate operation check</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>add_indicator</oml:name>
<oml:default_value>false</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>copy</oml:name>
<oml:default_value>true</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>fill_value</oml:name>
<oml:default_value>null</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>keep_empty_features</oml:name>
<oml:default_value>false</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>missing_values</oml:name>
<oml:default_value>NaN</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>strategy</oml:name>
<oml:default_value>"mean"</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>verbose</oml:name>
<oml:default_value>"deprecated"</oml:default_value>
</oml:parameter>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:component>
<oml:identifier>standardscaler</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.preprocessing._data.StandardScaler</oml:name>
<oml:custom_name>sklearn.StandardScaler</oml:custom_name>
<oml:class_name>sklearn.preprocessing._data.StandardScaler</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Standardize features by removing the mean and scaling to unit variance.
The standard score of a sample `x` is calculated as:
z = (x - u) / s
where `u` is the mean of the training samples or zero if `with_mean=False`,
and `s` is the standard deviation of the training samples or one if
`with_std=False`.
Centering and scaling happen independently on each feature by computing
the relevant statistics on the samples in the training set. Mean and
standard deviation are then stored to be used on later data using
:meth:`transform`.
Standardization of a dataset is a common requirement for many
machine learning estimators: they might behave badly if the
individual features do not more or less look like standard normally
distributed data (e.g. Gaussian with 0 mean and unit variance).
For instance many elements used in the objective function of
a learning algorithm (such as the RBF kernel of Support Vector
Machines or the L1 and L2 regularizers of linear models) assume that
all features are centered around 0 ...</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>copy</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>true</oml:default_value>
<oml:description>If False, try to avoid a copy and do inplace scaling instead
This is not guaranteed to always work inplace; e.g. if the data is
not a NumPy array or scipy.sparse CSR matrix, a copy may still be
returned</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>with_mean</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>true</oml:default_value>
<oml:description>If True, center the data before scaling
This does not work (and will raise an exception) when attempted on
sparse matrices, because centering them entails building a dense
matrix which in common use cases is likely to be too large to fit in
memory</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>with_std</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>true</oml:default_value>
<oml:description>If True, scale the data to unit variance (or equivalently,
unit standard deviation).</oml:description>
</oml:parameter>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:component>
<oml:identifier>VarianceThreshold</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.feature_selection._variance_threshold.VarianceThreshold</oml:name>
<oml:custom_name>sklearn.VarianceThreshold</oml:custom_name>
<oml:class_name>sklearn.feature_selection._variance_threshold.VarianceThreshold</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Feature selector that removes all low-variance features.
This feature selection algorithm looks only at the features (X), not the
desired outputs (y), and can thus be used for unsupervised learning.</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>threshold</oml:name>
<oml:data_type>float</oml:data_type>
<oml:default_value>0.0</oml:default_value>
<oml:description>Features with a training-set variance lower than this threshold will
be removed. The default is to keep all features with non-zero variance,
i.e. remove the features that have the same value in all samples.</oml:description>
</oml:parameter>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:component>
<oml:identifier>Estimator</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.model_selection._search.RandomizedSearchCV(estimator=sklearn.neighbors._classification.KNeighborsClassifier)</oml:name>
<oml:custom_name>sklearn.RandomizedSearchCV(KNeighborsClassifier)</oml:custom_name>
<oml:class_name>sklearn.model_selection._search.RandomizedSearchCV</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Randomized search on hyper parameters.
RandomizedSearchCV implements a "fit" and a "score" method.
It also implements "score_samples", "predict", "predict_proba",
"decision_function", "transform" and "inverse_transform" if they are
implemented in the estimator used.
The parameters of the estimator used to apply these methods are optimized
by cross-validated search over parameter settings.
In contrast to GridSearchCV, not all parameter values are tried out, but
rather a fixed number of parameter settings is sampled from the specified
distributions. The number of parameter settings that are tried is
given by n_iter.
If all parameters are presented as a list,
sampling without replacement is performed. If at least one parameter
is given as a distribution, sampling with replacement is used.
It is highly recommended to use continuous distributions for continuous
parameters.</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>cv</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>3</oml:default_value>
<oml:description>Determines the cross-validation splitting strategy
Possible inputs for cv are:
- None, to use the default 5-fold cross validation,
- integer, to specify the number of folds in a `(Stratified)KFold`,
- :term:`CV splitter`,
- An iterable yielding (train, test) splits as arrays of indices
For integer/None inputs, if the estimator is a classifier and ``y`` is
either binary or multiclass, :class:`StratifiedKFold` is used. In all
other cases, :class:`KFold` is used. These splitters are instantiated
with `shuffle=False` so the splits will be the same across calls
Refer :ref:`User Guide <cross_validation>` for the various
cross-validation strategies that can be used here
.. versionchanged:: 0.22
``cv`` default value if None changed from 3-fold to 5-fold</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>error_score</oml:name>
<oml:data_type>'raise' or numeric</oml:data_type>
<oml:default_value>NaN</oml:default_value>
<oml:description>Value to assign to the score if an error occurs in estimator fitting
If set to 'raise', the error is raised. If a numeric value is given,
FitFailedWarning is raised. This parameter does not affect the refit
step, which will always raise the error</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>estimator</oml:name>
<oml:data_type>estimator object</oml:data_type>
<oml:default_value>{"oml-python:serialized_object": "component_reference", "value": {"key": "estimator", "step_name": null}}</oml:default_value>
<oml:description>An object of that type is instantiated for each grid point
This is assumed to implement the scikit-learn estimator interface
Either estimator needs to provide a ``score`` function,
or ``scoring`` must be passed</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>n_iter</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>10</oml:default_value>
<oml:description>Number of parameter settings that are sampled. n_iter trades
off runtime vs quality of the solution</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>n_jobs</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Number of jobs to run in parallel
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details
.. versionchanged:: v0.20
`n_jobs` default changed from 1 to None</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>param_distributions</oml:name>
<oml:data_type>dict or list of dicts</oml:data_type>
<oml:default_value>{"n_neighbors": [2, 3, 4, 5, 6, 7, 8, 9]}</oml:default_value>
<oml:description>Dictionary with parameters names (`str`) as keys and distributions
or lists of parameters to try. Distributions must provide a ``rvs``
method for sampling (such as those from scipy.stats.distributions)
If a list is given, it is sampled uniformly
If a list of dicts is given, first a dict is sampled uniformly, and
then a parameter is sampled using that dict as above</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>pre_dispatch</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>"2*n_jobs"</oml:default_value>
<oml:description>Controls the number of jobs that get dispatched during parallel
execution. Reducing this number can be useful to avoid an
explosion of memory consumption when more jobs get dispatched
than CPUs can process. This parameter can be:
- None, in which case all the jobs are immediately
created and spawned. Use this for lightweight and
fast-running jobs, to avoid delays due to on-demand
spawning of the jobs
- An int, giving the exact number of total jobs that are
spawned
- A str, giving an expression as a function of n_jobs,
as in '2*n_jobs'</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>random_state</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Pseudo random number generator state used for random uniform sampling
from lists of possible values instead of scipy.stats distributions
Pass an int for reproducible output across multiple
function calls
See :term:`Glossary <random_state>`</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>refit</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>true</oml:default_value>
<oml:description>Refit an estimator using the best found parameters on the whole
dataset
For multiple metric evaluation, this needs to be a `str` denoting the
scorer that would be used to find the best parameters for refitting
the estimator at the end
Where there are considerations other than maximum score in
choosing a best estimator, ``refit`` can be set to a function which
returns the selected ``best_index_`` given the ``cv_results``. In that
case, the ``best_estimator_`` and ``best_params_`` will be set
according to the returned ``best_index_`` while the ``best_score_``
attribute will not be available
The refitted estimator is made available at the ``best_estimator_``
attribute and permits using ``predict`` directly on this
``RandomizedSearchCV`` instance
Also for multiple metric evaluation, the attributes ``best_index_``,
``best_score_`` and ``best_params_`` will only be available if
``refit`` is set and all of them will be determined w.r.t this speci...</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>return_train_score</oml:name>
<oml:data_type>bool</oml:data_type>
<oml:default_value>false</oml:default_value>
<oml:description>If ``False``, the ``cv_results_`` attribute will not include training
scores
Computing training scores is used to get insights on how different
parameter settings impact the overfitting/underfitting trade-off
However computing the scores on the training set can be computationally
expensive and is not strictly required to select the parameters that
yield the best generalization performance
.. versionadded:: 0.19
.. versionchanged:: 0.21
Default value was changed from ``True`` to ``False``</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>scoring</oml:name>
<oml:data_type>str</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Strategy to evaluate the performance of the cross-validated model on
the test set
If `scoring` represents a single score, one can use:
- a single string (see :ref:`scoring_parameter`);
- a callable (see :ref:`scoring`) that returns a single value
If `scoring` represents multiple scores, one can use:
- a list or tuple of unique strings;
- a callable returning a dictionary where the keys are the metric
names and the values are the metric scores;
- a dictionary with metric names as keys and callables a values
See :ref:`multimetric_grid_search` for an example
If None, the estimator's score method is used</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>verbose</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>0</oml:default_value>
<oml:description>Controls the verbosity: the higher, the more messages</oml:description>
</oml:parameter>
<oml:component>
<oml:identifier>estimator</oml:identifier>
<oml:flow xmlns:oml="http://openml.org/openml">
<oml:name>TEST50fc8f35e0sklearn.neighbors._classification.KNeighborsClassifier</oml:name>
<oml:custom_name>sklearn.KNeighborsClassifier</oml:custom_name>
<oml:class_name>sklearn.neighbors._classification.KNeighborsClassifier</oml:class_name>
<oml:external_version>openml==0.13.0,sklearn==1.2.1</oml:external_version>
<oml:description>Classifier implementing the k-nearest neighbors vote.</oml:description>
<oml:language>English</oml:language>
<oml:dependencies>sklearn==1.2.1
numpy>=1.17.3
scipy>=1.3.2
joblib>=1.1.1
threadpoolctl>=2.0.0</oml:dependencies>
<oml:parameter>
<oml:name>algorithm</oml:name>
<oml:default_value>"auto"</oml:default_value>
</oml:parameter>
<oml:parameter>
<oml:name>leaf_size</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>30</oml:default_value>
<oml:description>Leaf size passed to BallTree or KDTree. This can affect the
speed of the construction and query, as well as the memory
required to store the tree. The optimal value depends on the
nature of the problem</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>metric</oml:name>
<oml:data_type>str or callable</oml:data_type>
<oml:default_value>"minkowski"</oml:default_value>
<oml:description>Metric to use for distance computation. Default is "minkowski", which
results in the standard Euclidean distance when p = 2. See the
documentation of `scipy.spatial.distance
<https://docs.scipy.org/doc/scipy/reference/spatial.distance.html>`_ and
the metrics listed in
:class:`~sklearn.metrics.pairwise.distance_metrics` for valid metric
values
If metric is "precomputed", X is assumed to be a distance matrix and
must be square during fit. X may be a :term:`sparse graph`, in which
case only "nonzero" elements may be considered neighbors
If metric is a callable function, it takes two arrays representing 1D
vectors as inputs and must return one value indicating the distance
between those vectors. This works for Scipy's metrics, but is less
efficient than passing the metric name as a string</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>metric_params</oml:name>
<oml:data_type>dict</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>Additional keyword arguments for the metric function</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>n_jobs</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>null</oml:default_value>
<oml:description>The number of parallel jobs to run for neighbors search
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
for more details
Doesn't affect :meth:`fit` method.</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>n_neighbors</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>5</oml:default_value>
<oml:description>Number of neighbors to use by default for :meth:`kneighbors` queries
weights : {'uniform', 'distance'}, callable or None, default='uniform'
Weight function used in prediction. Possible values:
- 'uniform' : uniform weights. All points in each neighborhood
are weighted equally
- 'distance' : weight points by the inverse of their distance
in this case, closer neighbors of a query point will have a
greater influence than neighbors which are further away
- [callable] : a user-defined function which accepts an
array of distances, and returns an array of the same shape
containing the weights
algorithm : {'auto', 'ball_tree', 'kd_tree', 'brute'}, default='auto'
Algorithm used to compute the nearest neighbors:
- 'ball_tree' will use :class:`BallTree`
- 'kd_tree' will use :class:`KDTree`
- 'brute' will use a brute-force search
- 'auto' will attempt to decide the most appropriate algorithm
based on the values passed to :meth:`fit` method
...</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>p</oml:name>
<oml:data_type>int</oml:data_type>
<oml:default_value>2</oml:default_value>
<oml:description>Power parameter for the Minkowski metric. When p = 1, this is
equivalent to using manhattan_distance (l1), and euclidean_distance
(l2) for p = 2. For arbitrary p, minkowski_distance (l_p) is used</oml:description>
</oml:parameter>
<oml:parameter>
<oml:name>weights</oml:name>
<oml:default_value>"uniform"</oml:default_value>
</oml:parameter>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>
</oml:component>
<oml:tag>openml-python</oml:tag>
<oml:tag>sklearn</oml:tag>
<oml:tag>scikit-learn</oml:tag>
<oml:tag>python</oml:tag>
<oml:tag>sklearn_1.2.1</oml:tag>
</oml:flow>