Añadido un simulador de cruces basado en el entrenamiento previamente hecho
This commit is contained in:
@@ -20,7 +20,7 @@ namespace testML
|
||||
public static IEnumerable<object> Convert(List<Dictionary<string, object>> data, string toPredict, string objectFilename, out Type classType, out Type classPredictionType, out DataViewSchema schema)
|
||||
{
|
||||
var regexCR = new Regex(@"_CR\d+");
|
||||
var currentCR = regexCR.Match(toPredict).Groups[0].Value;
|
||||
var currentCR = regexCR.Match(toPredict ?? string.Empty).Groups[0].Value;
|
||||
|
||||
var schemaBuilder = new DataViewSchema.Builder();
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace testML
|
||||
{
|
||||
foreach (var key in sample.Keys)
|
||||
{
|
||||
if (!key.Contains(currentCR))
|
||||
if (currentCR != null && !key.Contains(currentCR))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace testML
|
||||
}
|
||||
}
|
||||
|
||||
var className = "OBJ"+ Path.GetFileNameWithoutExtension(objectFilename).Replace(".", "_");
|
||||
var className = "OBJ" + Path.GetFileNameWithoutExtension(objectFilename).Replace(".", "_");
|
||||
|
||||
Assembly dllAssembly = null;
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, objectFilename)))
|
||||
@@ -79,7 +79,7 @@ namespace testML
|
||||
var converter = new DictionaryToObjectConverterClass()
|
||||
{
|
||||
ClassName = className,
|
||||
ToPredict = toPredict,
|
||||
ToPredict = toPredict ?? "Empty",
|
||||
Definition = definition
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user