Class ModelStateSerializer

Utilities for saving and loading model states.

Inheritance
ModelStateSerializer
Namespace: MOSAIC.Components.MachineLearning.Factory
Assembly: MOSAIC.dll
Syntax
public static class ModelStateSerializer

Methods

ArrayToMatrix(double[][])

Declaration
private static Matrix<double> ArrayToMatrix(double[][] arr)
Parameters
Type Name Description
double[][] arr
Returns
Type Description
Matrix<double>

Load(string)

Loads a RidgeState from a JSON file.

Declaration
public static RidgeState Load(string path)
Parameters
Type Name Description
string path
Returns
Type Description
RidgeState

LoadCsv(string, int)

Loads a RidgeState from CSV format.

Declaration
public static RidgeState LoadCsv(string path, int inputDim)
Parameters
Type Name Description
string path

Path to the CSV file.

int inputDim

Input dimension (to know where Ainv ends and B begins).

Returns
Type Description
RidgeState

MatrixToArray(Matrix<double>)

Declaration
private static double[][] MatrixToArray(Matrix<double> m)
Parameters
Type Name Description
Matrix<double> m
Returns
Type Description
double[][]

Save(RidgeState, string)

Saves a RidgeState to a JSON file.

Declaration
public static void Save(RidgeState state, string path)
Parameters
Type Name Description
RidgeState state
string path

SaveCsv(RidgeState, string)

Saves a RidgeState to the CSV format accepted by existing model files.

Declaration
public static void SaveCsv(RidgeState state, string path)
Parameters
Type Name Description
RidgeState state
string path

Search documentation

Start typing to search the documentation.