Class ModelStateSerializer
Utilities for saving and loading model states.
Inheritance
ModelStateSerializer
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
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
MatrixToArray(Matrix<double>)
Declaration
private static double[][] MatrixToArray(Matrix<double> m)
Parameters
| Type |
Name |
Description |
| Matrix<double> |
m |
|
Returns
Save(RidgeState, string)
Saves a RidgeState to a JSON file.
Declaration
public static void Save(RidgeState state, string path)
Parameters
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