Ejemplo n.º 1
0
 public Task <Model> Create(DataSet dataset, string name = null, string[] inputFields = null, string objectiveField = null, Model.Arguments arguments = null)
 {
     return(CreateModel(dataset, name, inputFields, objectiveField, arguments));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a model.
 /// </summary>
 /// <param name="dataset">A DataSet instance</param>
 /// <param name="name">The name you want to give to the new model. </param>
 /// <param name="inputFields">Specifies the ids of the fields that you want to use as predictors to create the model. </param>
 /// <param name="objectiveField">Specifies the id of the field that you want to predict.</param>
 public Task <Model> CreateModel(DataSet dataset, string name = null, string[] inputFields = null, string objectiveField = null, Model.Arguments arguments = null)
 {
     arguments = arguments ?? new Model.Arguments();
     if (!string.IsNullOrWhiteSpace(name))
     {
         arguments.Name = name;
     }
     if (inputFields != null && inputFields.Length > 0)
     {
         foreach (var input in arguments.Inputs)
         {
             arguments.Inputs.Add(input);
         }
     }
     if (!string.IsNullOrWhiteSpace(objectiveField))
     {
         arguments.Objective = objectiveField;
     }
     arguments.DataSet = dataset.Resource;
     return(Create <Model>(arguments));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a model using supplied arguments.
 /// </summary>
 public Task <Model> CreateModel(Model.Arguments arguments)
 {
     return(Create <Model>(arguments));
 }