public static MulticlassSupportVectorMachine stringToMsvm(string s) { string[] temp = s.Split('#'); KernelSupportVectorMachine[][] ksvm = new KernelSupportVectorMachine[2][]; ksvm[0] = new KernelSupportVectorMachine[1]; ksvm[0][0] = stringToSVM(temp[0]); ksvm[1] = new KernelSupportVectorMachine[2]; ksvm[1][0] = stringToSVM(temp[1]); ksvm[1][1] = stringToSVM(temp[2]); MulticlassSupportVectorMachine msvm = new MulticlassSupportVectorMachine(ksvm); return(msvm); }
public static string msvmToString(MulticlassSupportVectorMachine msvm) { return(svmToString(msvm.Machines[0][0]) + "#" + svmToString(msvm.Machines[1][0]) + "#" + svmToString(msvm.Machines[1][1])); }