Stats.ProcessMissingValues Method

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

ProcessMissingValues(Double[], MissingValueAction) Applies the specified action to the missing values in the values.
ProcessMissingValues(Vector<Double>, MissingValueAction) Applies the specified action to the missing values in the values.
ProcessMissingValues(Double[], MissingValueAction, Double) Applies the specified action to the missing values in the values.
ProcessMissingValues(Vector<Double>, MissingValueAction, Double) Applies the specified action to the missing values in the values.
ProcessMissingValues(Double[], Double, MissingValueAction, Double) Applies the specified action to the missing values in the values.
ProcessMissingValues(Vector<Double>, Double, MissingValueAction, Double) Applies the specified action to the missing values in the values.

ProcessMissingValues(Double[], MissingValueAction)

Applies the specified action to the missing values in the values.
C#
public static double[] ProcessMissingValues(
	double[] values,
	MissingValueAction action
)

Parameters

values  Double[]
A Double array containing the values to process.
action  MissingValueAction
A MissingValueAction value that specifies how the replacement value should be chosen.

Return Value

Double[]
A Double array containing the processed values.

Remarks

This method returns the original array unless action equals MissingValueAction.Discard and the values contains missing values.

If applicable, missing values are replaced by zero.

Exceptions

ArgumentNullException

values is null.

ArgumentOutOfRangeException

action is not a valid MissingValueAction value.

MissingValueException

action equals Fail and one of the observations is missing.

ProcessMissingValues(Vector<Double>, MissingValueAction)

Applies the specified action to the missing values in the values.
C#
public static Vector<double> ProcessMissingValues(
	this Vector<double> values,
	MissingValueAction action
)

Parameters

values  Vector<Double>
A vector containing the values to process.
action  MissingValueAction
A MissingValueAction value that specifies how the replacement value should be chosen.

Return Value

Vector<Double>
A vector containing the processed values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This method returns the original vector unless action equals MissingValueAction.Discard and the values contains missing values.

If applicable, missing values are replaced by zero.

Exceptions

ArgumentOutOfRangeException

action is not a valid MissingValueAction value.

MissingValueException

action equals Fail and one of the observations is missing.

ProcessMissingValues(Double[], MissingValueAction, Double)

Applies the specified action to the missing values in the values.
C#
public static double[] ProcessMissingValues(
	double[] values,
	MissingValueAction action,
	double replacementValue
)

Parameters

values  Double[]
A Double array containing the values to process.
action  MissingValueAction
A MissingValueAction value that specifies how the replacement value should be chosen.
replacementValue  Double
The replacement value, if one is required.

Return Value

Double[]

Remarks

This method returns the original array unless action equals MissingValueAction.Discard and the values contains missing values.

Exceptions

ArgumentNullException

values is null.

ArgumentOutOfRangeException

action is not a valid MissingValueAction value.

MissingValueException

action equals Fail and one of the observations is missing.

ProcessMissingValues(Vector<Double>, MissingValueAction, Double)

Applies the specified action to the missing values in the values.
C#
public static Vector<double> ProcessMissingValues(
	this Vector<double> values,
	MissingValueAction action,
	double replacementValue
)

Parameters

values  Vector<Double>
A vector containing the values to process.
action  MissingValueAction
A MissingValueAction value that specifies how the replacement value should be chosen.
replacementValue  Double
The replacement value, if one is required.

Return Value

Vector<Double>

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This method returns the original vector unless action equals MissingValueAction.Discard and the values contains missing values.

Exceptions

ArgumentNullException

values is null.

ArgumentOutOfRangeException

action is not a valid MissingValueAction value.

MissingValueException

action equals Fail and one of the observations is missing.

ProcessMissingValues(Double[], Double, MissingValueAction, Double)

Applies the specified action to the missing values in the values.
C#
public static double[] ProcessMissingValues(
	double[] values,
	double missingValue,
	MissingValueAction action,
	double replacementValue
)

Parameters

values  Double[]
A Double array containing the values to process.
missingValue  Double
The value that indicates the observation is missing.
action  MissingValueAction
A MissingValueAction value that specifies how the replacement value should be chosen.
replacementValue  Double
The replacement value, if one is required.

Return Value

Double[]

Remarks

This method returns the original array unless action equals MissingValueAction.Discard and the values contains missing values.

Exceptions

ArgumentNullException

values is null.

ArgumentOutOfRangeException

action is not a valid MissingValueAction value.

MissingValueException

action equals Fail and one of the observations is missing.

ProcessMissingValues(Vector<Double>, Double, MissingValueAction, Double)

Applies the specified action to the missing values in the values.
C#
public static Vector<double> ProcessMissingValues(
	this Vector<double> values,
	double missingValue,
	MissingValueAction action,
	double replacementValue
)

Parameters

values  Vector<Double>
A vector containing the values to process.
missingValue  Double
The value that indicates the observation is missing.
action  MissingValueAction
A MissingValueAction value that specifies how the replacement value should be chosen.
replacementValue  Double
The replacement value, if one is required.

Return Value

Vector<Double>

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

This method returns the original vector unless action equals MissingValueAction.Discard and the values contains missing values.

Exceptions

ArgumentNullException

values is null.

ArgumentOutOfRangeException

action is not a valid MissingValueAction value.

MissingValueException

action equals Fail and one of the observations is missing.

See Also