18721
8309
sklearn.compose._column_transformer.ColumnTransformer(num=sklearn.preprocessing._data.StandardScaler,cat=sklearn.preprocessing._encoders.OneHotEncoder)
sklearn.ColumnTransformer
sklearn.compose._column_transformer.ColumnTransformer
1
openml==0.11.1dev,sklearn==0.23.1
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.
2020-10-29T14:36:38
English
sklearn==0.23.1
numpy>=1.6.1
scipy>=0.9
n_jobs
int
null
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
remainder
"drop"
sparse_threshold
float
0.3
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
transformer_weights
dict
null
Multiplicative weights for features per transformer. The output of the
transformer is multiplied by these weights. Keys are transformer names,
values the weights
transformers
list of tuples
[{"oml-python:serialized_object": "component_reference", "value": {"key": "num", "step_name": "num", "argument_1": {"oml-python:serialized_object": "function", "value": "openml.testing.cont"}}}, {"oml-python:serialized_object": "component_reference", "value": {"key": "cat", "step_name": "cat", "argument_1": {"oml-python:serialized_object": "function", "value": "openml.testing.cat"}}}]
List of (name, transformer, columns) tuples specifying the
transformer objects to be applied to subsets of the data
verbose
bool
false
If True, the time elapsed while fitting each transformer will be
printed as it is completed.
num
18722
8309
sklearn.preprocessing._data.StandardScaler
sklearn.StandardScaler
sklearn.preprocessing._data.StandardScaler
6
openml==0.11.1dev,sklearn==0.23.1
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 a...
2020-10-29T14:36:38
English
sklearn==0.23.1
numpy>=1.6.1
scipy>=0.9
copy
boolean
true
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
with_mean
boolean
true
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
with_std
boolean
true
If True, scale the data to unit variance (or equivalently,
unit standard deviation).
openml-python
python
scikit-learn
sklearn
sklearn_0.23.1
cat
18723
8309
sklearn.preprocessing._encoders.OneHotEncoder
sklearn.OneHotEncoder
sklearn.preprocessing._encoders.OneHotEncoder
23
openml==0.11.1dev,sklearn==0.23.1
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``
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.
2020-10-29T14:36:38
English
sklearn==0.23.1
numpy>=1.6.1
scipy>=0.9
categories
'auto' or a list of array
"auto"
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 a 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 a neural network or an unregularized regression
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
drop
null
dtype
number type
{"oml-python:serialized_object": "type", "value": "np.float64"}
Desired dtype of output
handle_unknown : {'error', 'ignore'}, default='error'
Whether to raise an error or ignore if an unknown categorical feature
is present during transform (default is to raise). When this parameter
is set to 'ignore' and 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.
handle_unknown
"ignore"
sparse
bool
true
Will return sparse matrix if set True else will return an array
openml-python
python
scikit-learn
sklearn
sklearn_0.23.1
openml-python
python
scikit-learn
sklearn
sklearn_0.23.1