scatter()¶
- audplot.scatter(truth, prediction, *, fit=False, order=1, ax=None)[source]¶
Scatter plot of truth and predicted values.
- Parameters
fit (
bool
) – ifTrue
, fit a regression model relating the x and y variablesorder (
int
) – if greater than 1, estimate a polynomial regression model (seefit
)ax (
Optional
[Axes
]) – pre-existing axes for the plot. Otherwise, callsmatplotlib.pyplot.gca()
internally
Examples
>>> truth = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] >>> prediction = [0.1, 0.8, 2.3, 2.4, 3.9, 5, 6.2, 7.1, 7.8, 9, 9] >>> scatter(truth, prediction, fit=True)