<a id="skfolio-descriptor-passthrough"></a>

# skfolio.descriptor.Passthrough

<a id="skfolio.descriptor.Passthrough"></a>

### *class* skfolio.descriptor.Passthrough(field)

Passthrough descriptor for an [`AssetPanel`](https://skfolio.org/generated/skfolio.containers.AssetPanel.html.md#skfolio.containers.AssetPanel) field.

Returns the selected panel field without numerical transformation. This is
useful for raw vendor fields or for values computed upstream that should
enter a factor exposure model unchanged.

* **Parameters:**
  **field** *str*
  : Name of the field to read from the input
    [`AssetPanel`](https://skfolio.org/generated/skfolio.containers.AssetPanel.html.md#skfolio.containers.AssetPanel).
* **Attributes:**
  **n_assets_** *int*
  : Number of assets seen during fitting.

  **asset_names_** *ndarray of shape (n_assets,)*
  : Asset names seen during fitting.

### Methods

| [`fit_transform`](#skfolio.descriptor.Passthrough.fit_transform)(X[, y])         | Return the configured panel field.             |
|--------------------------------------------------------------------------------|------------------------------------------------|
| [`get_metadata_routing`](#skfolio.descriptor.Passthrough.get_metadata_routing)()        | Get metadata routing of this object.           |
| [`get_params`](#skfolio.descriptor.Passthrough.get_params)([deep])            | Get parameters for this estimator.             |
| [`partial_fit_transform`](#skfolio.descriptor.Passthrough.partial_fit_transform)(X[, y]) | Stateless class delegation to `fit_transform`. |
| [`set_params`](#skfolio.descriptor.Passthrough.set_params)(\*\*params)        | Set the parameters of this estimator.          |

### Examples

```pycon
>>> from skfolio.datasets import make_synthetic_characteristics
>>> from skfolio.descriptor import Passthrough
>>>
>>> X = make_synthetic_characteristics()
>>>
>>> descriptor = Passthrough("eps_ntm")
>>> eps_ntm = descriptor.fit_transform(X)
```

<a id="skfolio.descriptor.Passthrough.fit_transform"></a>

#### fit_transform(X, y=None, \*\*fit_params)

Return the configured panel field.

* **Parameters:**
  **X** *AssetPanel*
  : Input panel containing the `field` characteristic configured at
    construction.

  **y** *None*
  : Ignored. Present for compatibility with scikit-learn’s API.

  **\*\*fit_params** *dict*
  : Additional fit parameters. Ignored.
* **Returns:**
  **values** *ndarray of shape (n_observations, n_assets)*
  : Raw values of `field` for each observation and asset.

<a id="skfolio.descriptor.Passthrough.get_metadata_routing"></a>

#### get_metadata_routing()

Get metadata routing of this object.

Please check [User Guide](https://skfolio.org/user_guide/metadata_routing.html.md#metadata-routing) on how the routing
mechanism works.

* **Returns:**
  **routing** *MetadataRequest*
  : A `MetadataRequest` encapsulating
    routing information.

<a id="skfolio.descriptor.Passthrough.get_params"></a>

#### get_params(deep=True)

Get parameters for this estimator.

* **Parameters:**
  **deep** *bool, default=True*
  : If True, will return the parameters for this estimator and
    contained subobjects that are estimators.
* **Returns:**
  **params** *dict*
  : Parameter names mapped to their values.

<a id="skfolio.descriptor.Passthrough.partial_fit_transform"></a>

#### partial_fit_transform(X, y=None, \*\*fit_params)

Stateless class delegation to `fit_transform`.

<a id="skfolio.descriptor.Passthrough.set_params"></a>

#### set_params(\*\*params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects
(such as `Pipeline`). The latter have
parameters of the form `<component>__<parameter>` so that it’s
possible to update each component of a nested object.

* **Parameters:**
  **\*\*params** *dict*
  : Estimator parameters.
* **Returns:**
  **self** *estimator instance*
  : Estimator instance.

