Singular Value Decomposition
This transform reduces the dimensionality by Singular Value Decomposition method. It is used in feature engineering and is applied only to the numerical data.
tags: [“Data Preparation”]
Parameters
The table gives a brief description about each parameter in Shuffle Dataset transform.
- Name:
By default, the transform name is populated. You can also add a custom name for the transform.
- Input Dataset:
The file name of the input dataset. You can select this from the drop-down list to reduce by singular value decomposition. (Required: True, Multiple: False)
- Output Dataset:
The file name of the SVD reduced Dataset. (Required: True, Multiple: False)
- Number of components:
The total number of columns to which SVD must be applied. The value should be less than the number of columns in the dataset. (Required: True, Multiple: False, Datatypes: [“LONG”], Options: [‘CONSTANT’])
- Target:
The column that is the target variable in the dataset. This is the variable on which predictions are made. (Required: True, Multiple: False, Datatypes: [“STRING”], Options: [‘FIELDS’], Datasets: [‘df’])
The sample input for this transform looks as shown in the screenshot:
The output after running the Singular Value Decomposition transform on the dataset appears as below:
How to use it in Notebook
template=TemplateV2.get_template_by('Singular Value Decomposition')
recipe_Singular_Value_Decomposition= project.addRecipe([car_data, employee_data, temperature_data, only_numeric], name='Singular Value Decomposition')
transform=Transform()
transform.templateId = template.id
transform.name='Singular Value Decomposition'
transform.variables = {
'input_dataset':'only_numeric',
'output_dataset':'svd',
'n':1,
'target':"Age"}
recipe_Singular_Value_Decomposition.add_transform(transform)
recipe_Singular_Value_Decomposition.run()
Requirements
scikit-learn pandas