Ya hace predicciones y crea el ZIP
This commit is contained in:
@@ -28,8 +28,14 @@ namespace testML
|
||||
/// </summary>
|
||||
public virtual string TransformText()
|
||||
{
|
||||
this.Write("\r\nusing System;\r\nusing System.Text;\r\nusing Microsoft.ML.Data;\r\n\r\nnamespace Dictio" +
|
||||
"naryToObjectConverterNamespace\r\n{\r\n\tpublic class ");
|
||||
|
||||
#line 6 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
var toPredictType = Definition[ToPredict];
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("using System;\r\nusing System.Text;\r\nusing Microsoft.ML.Data;\r\n\r\nnamespace Dictiona" +
|
||||
"ryToObjectConverterNamespace\r\n{\r\n\tpublic class ");
|
||||
|
||||
#line 13 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(ClassName));
|
||||
@@ -141,7 +147,77 @@ namespace testML
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n}");
|
||||
this.Write("\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\tpublic class ");
|
||||
|
||||
#line 54 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(ClassName));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("Prediction: testML.IDictionaryToObjectConverter\r\n\t{\r\n\t\t[ColumnName(\"PredictedLabe" +
|
||||
"l\")]\t\r\n\t\tpublic ");
|
||||
|
||||
#line 57 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(toPredictType.FullName));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" ");
|
||||
|
||||
#line 57 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(ToPredict));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(@" { get; set; }
|
||||
|
||||
public object this[string propertyName]
|
||||
{
|
||||
get { return GetValue(propertyName); }
|
||||
set { SetValue(propertyName, value); }
|
||||
}
|
||||
|
||||
public void SetValue(string propertyName, object value)
|
||||
{
|
||||
switch(propertyName)
|
||||
{
|
||||
case """);
|
||||
|
||||
#line 69 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(ToPredict));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\":\t");
|
||||
|
||||
#line 69 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(ToPredict));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(" = (");
|
||||
|
||||
#line 69 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(toPredictType.FullName));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(")value;\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic object GetValue(string propertyName)\r\n\t\t{\r\n" +
|
||||
"\t\t\tswitch(propertyName)\r\n\t\t\t{\r\n\t\t\t\tcase \"");
|
||||
|
||||
#line 77 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(ToPredict));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write("\":\treturn ");
|
||||
|
||||
#line 77 "C:\Users\miguel.maldonado\Documents\Subversion\TestML\testML\DictionaryToObjectConverterClass.tt"
|
||||
this.Write(this.ToStringHelper.ToStringWithCulture(ToPredict));
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
this.Write(";\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n}");
|
||||
return this.GenerationEnvironment.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user