Generate 10x10 Identity dataset
This transform will create a 10x10 identity matrix in Pandas using numpy library wherein all diagonal elements are 1 and the off-diagonal elements are 0.
tags: [“Data Preparation”]
Parameters
The table gives a brief description about each parameter in **Generate 10x10 Identity dataset ** transform.
- Name:
By default, the transform name is populated. You can also add a custom name for the transform.
- Output Dataset:
The file name with which the output dataset is created with 10x10 identity matrix. (Required: True, Multiple: False)
The sample input for this transform looks as shown in the screenshot.
The output after running the **Generate 10x10 Identity dataset ** transform on the dataset appears as below:
How to use it in Notebook
The following is the code snippet you must use in the Jupyter Notebook editor to run the **Generate 10x10 Identity dataset ** transform:
template=TemplateV2.get_template_by('Generate 10x10 Identity dataset ')
recipe_Generate_10x10_Identity_dataset_= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Generate 10x10 Identity dataset ')
transform=Transform()
transform.templateId = template.id
transform.name='Generate 10x10 Identity dataset '
transform.variables = {
'output_dataset':'id_dataset_10'}
recipe_Generate_10x10_Identity_dataset_.add_transform(transform)
recipe_Generate_10x10_Identity_dataset_.run()
Requirements
pandas numpy