---
title: "NodePiece Transforms"
component: "pytigergraph"
version: "1.7"
module: "gds"
html_url: "/pytigergraph/1.7/gds/nodepiece_transforms"
canonical_url: "https://www.tigergraph.com/docs/pytigergraph/1.7/gds/nodepiece_transforms"
markdown_url: "https://www.tigergraph.com/docs/pytigergraph/1.7/gds/nodepiece_transforms.md"
---

[View as HTML](https://www.tigergraph.com/docs/pytigergraph/1.7/gds/nodepiece_transforms)

# NodePiece Transforms

## NodePieceMLPTransform

The NodePieceMLPTransform converts a batch of data from the NodePieceLoader into a format that can be used in a MLP implemented in PyTorch.

### _\_init\__()

`_init_(label: str, features: list, target_type: str = None)`

Instantiate a NodePieceMLPTransform.

#### Parameters:

label (str): The attribute name that corresponds with the label being predicted. Supports numerical datatypes (INT, FLOAT, DOUBLE). \* `features (list of str, optional)`: List of attributes to use as features into the model. Supports numerical datatypes (INT, FLOAT, DOUBLE). \* `target_type (str, optional)`: The type of vertex to perform predictions on.

### _call_()

`_call_(data)`

Perform the transform.

#### Parameter:

* `data (pd.DataFrame)`: Batch of data produced by the NodePiece Loader.
