Skip to content

LinearRegression3D

StructChartGuruChartGuru
public struct LinearRegression3D

Result of a bivariate linear regression calculation for 3D charts. Represents the plane y = a + bx + cz.

public float XSlope

X-axis slope coefficient (b in y = a + bx + cz).

Returns

System.Single

public float ZSlope

Z-axis slope coefficient (c in y = a + bx + cz).

Returns

System.Single

public float Intercept

Y-intercept of the regression plane (a in y = a + bx + cz).

Returns

System.Single

public float RSquared

Coefficient of determination (R²), indicating fit quality (0-1).

Returns

System.Single

public float Evaluate(float x, float z)

Evaluates the fitted regression plane at an x/z coordinate.

Parameters

NameType
xSystem.Single
zSystem.Single

Returns

System.Single

public Func<float, float, float> ToFunction()

Creates a function that evaluates the regression plane at any x/z coordinate.

Returns

System.Func{System.Single,System.Single,System.Single}

public static LinearRegression3D Fit(float[] x, float[] y, float[] z)

Creates overflow behavior that repositions annotations to remain inside the selected chart boundary.

Parameters

NameType
xSystem.Single[]
ySystem.Single[]
zSystem.Single[]

Returns

ChartGuru.LinearRegression3D

public static LinearRegression3D Fit(IList<DataPoint3D> points)

Creates overflow behavior that repositions annotations to remain inside the selected chart boundary.

Parameters

NameType
pointsSystem.Collections.Generic.IList{ChartGuru.DataPoint3D}

Returns

ChartGuru.LinearRegression3D

public static LinearRegression3D Fit(IList<Vector3> points)

Creates overflow behavior that repositions annotations to remain inside the selected chart boundary.

Parameters

NameType
pointsSystem.Collections.Generic.IList{UnityEngine.Vector3}

Returns

ChartGuru.LinearRegression3D

Fit(IEnumerable, Func<T, float>, Func<T, float>, Func<T, float>)

Section titled “Fit(IEnumerable, Func<T, float>, Func<T, float>, Func<T, float>)”
public static LinearRegression3D Fit<T>(IEnumerable<T> data, Func<T, float> xSelector, Func<T, float> ySelector, Func<T, float> zSelector)

Creates overflow behavior that repositions annotations to remain inside the selected chart boundary.

Parameters

NameType
dataSystem.Collections.Generic.IEnumerable{{T}}
xSelectorSystem.Func{{T},System.Single}
ySelectorSystem.Func{{T},System.Single}
zSelectorSystem.Func{{T},System.Single}

Returns

ChartGuru.LinearRegression3D