Feature Neutralizer
API reference for sovai.extensions.feature_neutralizer
Module: sovai.extensions.feature_neutralizer
Functions
gram_schmidt_orthogonalization()
def gram_schmidt_orthogonalization(df)Applies Gram-Schmidt process to orthogonalize the features of the DataFrame. Returns a new DataFrame with orthogonalized features in the original scale.
Parameters
df
—
—
pca_neutralization()
def pca_neutralization(df)Neutralizes features using PCA by removing all but the last principal component.
Parameters
df
—
—
qr_neutralization()
def qr_neutralization(df)Neutralizes features using QR decomposition.
Parameters
df
—
—
svd_neutralization()
Neutralizes features using SVD by setting all but the smallest singular value to zero.
Parameters
df
—
—
iterative_regression_neutralization()
Neutralizes features using iterative regression.
Parameters
df
—
—
max_iter
—
Default: 100
tol
—
Default: 1e-06
orthogonalize_features_function()
Orthogonalizes the features of the DataFrame using the specified method.
Parameters
method
str
Method to use for orthogonalization. Options: 'gram_schmidt', 'qr'
Returns
CustomDataFrame: DataFrame with orthogonalized features
neutralize_features_function()
Neutralizes the features of the DataFrame using the specified method.
Parameters
method
str
Method to use for neutralization. Options: 'pca', 'svd', 'iterative_regression'
Returns
CustomDataFrame: DataFrame with neutralized features
Last updated