public SVMConfiguration GetConfiguration() { SVMConfiguration retVal = new SVMConfiguration(Parameters[0], features); retVal.Name = Name; return(retVal); }
public SVMConfiguration GenerateConfiguration() { SVMConfiguration conf = new SVMConfiguration(svmParams, features); conf.Name = "SVM_" + svmParams.C + "_" + svmParams.Gamma + "_F" + features.Count; return(conf); }
public static SVMConfiguration Deserialize(string input) { SVMConfiguration retVal = new SVMConfiguration(); retVal.parameters = new SVMParameter(); string[] bits = input.Split(SEPARATOR); retVal.Name = bits[0]; retVal.parameters.C = double.Parse(bits[1]); retVal.parameters.Gamma = double.Parse(bits[2]); retVal.parameters.Kernel = (SVMKernelType)Enum.Parse(typeof(SVMKernelType), bits[3]); retVal.features = FeatureCreator.GetFeaturesFromString(bits[4]); return retVal; }
public static SVMConfiguration Deserialize(string input) { SVMConfiguration retVal = new SVMConfiguration(); retVal.parameters = new SVMParameter(); string[] bits = input.Split(SEPARATOR); retVal.Name = bits[0]; retVal.parameters.C = double.Parse(bits[1]); retVal.parameters.Gamma = double.Parse(bits[2]); retVal.parameters.Kernel = (SVMKernelType)Enum.Parse(typeof(SVMKernelType), bits[3]); retVal.features = FeatureCreator.GetFeaturesFromString(bits[4]); return(retVal); }
public static MetaSVMConfiguration Deserialize(string input) { MetaSVMConfiguration msvmc = new MetaSVMConfiguration(); var bits = input.Split(META_SEPARATOR); msvmc.Name = bits[0]; msvmc.parameter.C = double.Parse(bits[1]); msvmc.parameter.Gamma = double.Parse(bits[2]); foreach (var item in bits.Skip(3)) { msvmc.stds.Add(SVMConfiguration.Deserialize(item)); } return(msvmc); }
public StdClassifier(SVMConfiguration conf, SAMData samData) : base(conf.Name, conf.GetParameter(), samData) { features = conf.GetFeautres(); }
public SVMConfiguration GetConfiguration() { SVMConfiguration retVal = new SVMConfiguration(Parameters[0], features); retVal.Name = Name; return retVal; }
public SVMConfiguration GenerateConfiguration() { SVMConfiguration conf = new SVMConfiguration(svmParams, features); conf.Name = "SVM_" + svmParams.C + "_" + svmParams.Gamma + "_F" + features.Count; return conf; }
void SaveConfiguration(SVMConfiguration conf) { if (!svmConfs.Contains(conf)) { this.Invoke((MethodInvoker)delegate { svmConfs.Add(conf); }); } if (!Directory.Exists(currentPath + @"\STD")) { Directory.CreateDirectory(currentPath + @"\STD"); } File.WriteAllText(currentPath + @"\STD\" + conf.Name + ".svm", conf.Serialize()); }