explained_variance¶
In [ ]:
explained_variance(y_true: str,
y_score: str,
input_relation: Union[str, vDataFrame)]
Computes the Explained Variance.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
y_true | str | ❌ | Response column. |
y_score | str | ❌ | Prediction. |
input_relation | str / vDataFrame | ❌ | The relation used for scoring. This relation can be a view, table, or customized relation. For example, you could write: "(SELECT ... FROM ...) x" as long as an alias is given at the end of the relation. |
Returns¶
float : score
Example¶
In [116]:
from verticapy import vDataFrame
vDataFrame("regression_example")
Out[116]:
In [117]:
from verticapy.learn.metrics import explained_variance
explained_variance("y_true", "y_score", "regression_example")
Out[117]:
