Class OutlierRemovalHelper<T, TInput, TOutput>
Provides helper methods for outlier removal algorithms.
public static class OutlierRemovalHelper<T, TInput, TOutput>
Type Parameters
TThe numeric type used for calculations.
TInputThe type of input data structure.
TOutputThe type of output data structure.
- Inheritance
-
OutlierRemovalHelper<T, TInput, TOutput>
- Inherited Members
Remarks
For Beginners: This helper class provides common functionality used by different outlier removal algorithms. It handles converting between different data types and ensures that the algorithms can work with various input and output formats.
Methods
ConvertToMatrixVector(TInput, TOutput)
Converts generic input and output types to concrete Matrix and Vector types.
public static (Matrix<T> InputMatrix, Vector<T> OutputVector) ConvertToMatrixVector(TInput inputs, TOutput outputs)
Parameters
inputsTInputThe generic input data.
outputsTOutputThe generic output data.
Returns
- (Matrix<T> Data, Vector<T> Labels)
A tuple containing the concrete Matrix and Vector representations.
Remarks
For Beginners: This method converts your data into a standard format that all the outlier detection algorithms can work with. It's like translating different languages into a common language that everyone understands.
ConvertToOriginalTypes(Matrix<T>, Vector<T>, Type, Type)
Converts Matrix and Vector data back to the original generic types.
public static (TInput CleanedInputs, TOutput CleanedOutputs) ConvertToOriginalTypes(Matrix<T> cleanedInputMatrix, Vector<T> cleanedOutputVector, Type inputType, Type outputType)
Parameters
cleanedInputMatrixMatrix<T>The cleaned matrix of inputs.
cleanedOutputVectorVector<T>The cleaned vector of outputs.
inputTypeTypeThe original type of the input data.
outputTypeTypeThe original type of the output data.
Returns
Remarks
For Beginners: After processing the data, this method converts it back to its original format so it can be used with the rest of your code. It's like translating from the common language back to each person's native language.