Loading...

verticapy.machine_learning.memmodel.decomposition.PCA.set_attributes#

PCA.set_attributes(**kwargs) None#

Sets the model attributes.

Examples#

Import the required module.

from verticapy.machine_learning.memmodel.linear_model import LinearModel

We will use the following attributes:

coefficients = [0.5, 1.2]

intercept = 2.0

Let’s create a model.

model_lm = LinearModel(coefficients, intercept)

Let’s get the model attributes.

model_lm.get_attributes()
Out[12]: {'coef': array([0.5, 1.2]), 'intercept': 2.0}

Change the model attributes.

model_lm.set_attributes(intercept = 4.0)

Get the model attributes again.

model_lm.get_attributes()
Out[14]: {'coef': array([0.5, 1.2]), 'intercept': 4.0}

Important

For this example, a specific model is utilized, and it may not correspond exactly to the model you are working with. To see a comprehensive example specific to your class of interest, please refer to that particular class.