BP_LDA.LDA_Learn.ModelInit_LDA_Feedforward C# (CSharp) Method

ModelInit_LDA_Feedforward() public static method

public static ModelInit_LDA_Feedforward ( paramModel_t paramModel ) : void
paramModel paramModel_t
return void
		public static void ModelInit_LDA_Feedforward(paramModel_t paramModel)
		{
			// Extract the parameters
			int nInput = paramModel.nInput;
			int nOutput = paramModel.nOutput;
			int nHid = paramModel.nHid;
			int nHidLayer = paramModel.nHidLayer;
			float alpha = paramModel.alpha;
			string OutputType = paramModel.OutputType;

			// Initialzie the model
			paramModel.b = new DenseColumnVector(nHid, alpha - 1);
			paramModel.Phi = new DenseMatrix(nInput, nHid);
			paramModel.Phi.FillRandomValues();
			MatrixOperation.ScalarAddMatrix(paramModel.Phi, 1.0f);
			MatrixOperation.bsxfunMatrixRightDivideVector(paramModel.Phi, MatrixOperation.VerticalSumMatrix(paramModel.Phi));
			paramModel.U = new DenseMatrix(nOutput, nHid);
			paramModel.U.FillRandomValues();
			MatrixOperation.ScalarMultiplyMatrix(paramModel.U, 0.01f);
		}