A dataset is a structured version of a source where each field has been processed and serialized according to its type. The complete and updated reference with all available parameters is in our documentation website.
Inheritance: Response
コード例 #1
0
 /// <summary>
 /// Create a dataset.
 /// </summary>
 /// <param name="source">The source from which you want to generate a dataset.</param>
 /// <param name="name">The optional name you want to give to the new dataset. </param>
 public Task<DataSet> Create(Source source, string name = null, DataSet.Arguments arguments = null)
 {
     arguments = arguments ?? new DataSet.Arguments();
     if (!string.IsNullOrWhiteSpace(name)) arguments.Name = name;
     arguments.Source = source.Resource;
     return Create<DataSet>(arguments);
 }
コード例 #2
0
 /// <summary>
 /// Create a cluster.
 /// </summary>
 /// <param name="dataset">A DataSet instance</param>
 /// <param name="name">The name you want to give to the new centroid. </param>
 /// <param name="arguments">Specifies the id of the field and values that you want to measure.</param>
 public Task<Centroid> CreateCentroid(DataSet dataset, string name = null, Centroid.Arguments arguments = null)
 {
     arguments = arguments ?? new Centroid.Arguments();
     if (!string.IsNullOrWhiteSpace(name)) arguments.Name = name;
     arguments.DataSet = dataset.Resource;
     return Create<Centroid>(arguments);
 }
コード例 #3
0
 /// <summary>
 /// Clone, filter or sample a dataset
 /// </summary>
 /// <param name="name">The optional name you want to give to the new dataset. </param>
 public Task<DataSet> Transform(DataSet dataset, string name = null, DataSet.Arguments arguments = null)
 {
     arguments = arguments ?? new DataSet.Arguments();
     arguments.OriginDataset = dataset.Resource;
     if (!string.IsNullOrWhiteSpace(name)) arguments.Name = name;
     return Create<DataSet>(arguments);
 }
コード例 #4
0
 /// <summary>
 /// Create an association.
 /// </summary>
 /// <param name="dataset">A DataSet instance</param>
 /// <param name="name">The name you want to give to the new association. </param>
 /// <param name="arguments">An object with more association parameters.</param>
 public Task<Association> CreateAssociation(DataSet dataset, string name = null,
                                     Association.Arguments arguments = null)
 {
     arguments = arguments ?? new Association.Arguments();
     if (!string.IsNullOrWhiteSpace(name)) arguments.Name = name;
     arguments.DataSet = dataset.Resource;
     return Create<Association>(arguments);
 }
コード例 #5
0
 /// <summary>
 /// Create a BatchTopicDistribution.
 /// </summary>
 /// <param name="dataset">A DataSet instance</param>
 /// <param name="name">The name you want to give to the new batch topic distributions. </param>
 /// <param name="arguments">Specifies the data that you want to predict.</param>
 public Task<BatchTopicDistribution> CreateBatchTopicDistribution(DataSet dataset, string name = null,
                                     BatchTopicDistribution.Arguments arguments = null)
 {
     arguments = arguments ?? new BatchTopicDistribution.Arguments();
     if (!string.IsNullOrWhiteSpace(name))
         arguments.Name = name;
     arguments.DataSet = dataset.Resource;
     return Create<BatchTopicDistribution>(arguments);
 }
コード例 #6
0
 /// <summary>
 /// Create an Ensemble.
 /// </summary>
 /// <param name="dataset">A DataSet instance</param>
 /// <param name="name">The name you want to give to the new ensemble. </param>
 /// <param name="arguments">Specifies the id of the field that you want to predict.</param>
 public Task<Ensemble> CreateEnsemble(DataSet dataset, string name = null,
                                     Ensemble.Arguments arguments = null)
 {
     arguments = arguments ?? new Ensemble.Arguments();
     if (!string.IsNullOrWhiteSpace(name))
         arguments.Name = name;
     arguments.DataSet = dataset.Resource;
     return Create<Ensemble>(arguments);
 }
コード例 #7
0
 /// <summary>
 /// Create a StatisticalTest.
 /// </summary>
 /// <param name="dataset">A DataSet instance</param>
 /// <param name="name">The name you want to give to the new correlation. </param>
 /// <param name="arguments">Other extra parameters.</param>
 public Task<StatisticalTest> CreateStatisticalTest(DataSet dataset, string name = null,
                                     StatisticalTest.Arguments arguments = null)
 {
     arguments = arguments ?? new StatisticalTest.Arguments();
     if (!string.IsNullOrWhiteSpace(name))
         arguments.Name = name;
     arguments.DataSet = dataset.Resource;
     return Create<StatisticalTest>(arguments);
 }
コード例 #8
0
 /// <summary>
 /// Create an Anomaly.
 /// </summary>
 /// <param name="dataset">A DataSet instance</param>
 /// <param name="name">The name you want to give to the new anomaly detector. </param>
 /// <param name="arguments">Specifies the id of the field that you want to predict.</param>
 public Task<Anomaly> CreateAnomaly(DataSet dataset, string name = null,
                                     Anomaly.Arguments arguments = null)
 {
     arguments = arguments ?? new Anomaly.Arguments();
     if (!string.IsNullOrWhiteSpace(name))
         arguments.Name = name;
     arguments.DataSet = dataset.Resource;
     return Create<Anomaly>(arguments);
 }
コード例 #9
0
 /// <summary>
 /// Creates a Logistic Regression.
 /// </summary>
 /// <param name="dataset">A DataSet instance</param>
 /// <param name="name">The name you want to give to the new logistic regression. </param>
 /// <param name="arguments">Specifies the id of the field that you want to predict.</param>
 public Task<LogisticRegression> CreateLogisticRegression(DataSet dataset, string name = null,
                                     LogisticRegression.Arguments arguments = null)
 {
     arguments = arguments ?? new LogisticRegression.Arguments();
     if (!string.IsNullOrWhiteSpace(name))
         arguments.Name = name;
     arguments.DataSet = dataset.Resource;
     return Create<LogisticRegression>(arguments);
 }
コード例 #10
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);
 }
コード例 #11
0
 /// <summary>
 /// Create a cluster.
 /// </summary>
 /// <param name="dataset">A DataSet instance</param>
 /// <param name="name">The name you want to give to the new cluster. </param>
 /// <param name="k">Specifies the number of groups you want to create as parts of the cluster. </param>
 /// <param name="arguments">An object with more cluster parameters.</param>
 public Task<Cluster> CreateCluster(DataSet dataset, string name = null, int k = 8,
                                     Cluster.Arguments arguments = null)
 {
     arguments = arguments ?? new Cluster.Arguments();
     if (!string.IsNullOrWhiteSpace(name)) arguments.Name = name;
     if (k > 0)
     {
         arguments.NumberOfCluster = k;
     }
     arguments.DataSet = dataset.Resource;
     return Create<Cluster>(arguments);
 }
コード例 #12
0
ファイル: LocalModel.cs プロジェクト: bigmlcom/bigml-csharp
            private Dictionary<string, string> getFieldTermAnalysis(DataSet.Field currentField)
            {
                Dictionary<string, string> options = new Dictionary<string, string>();
                DataSet.Field.Summary.Text textSummary;
                string fieldId, regex;
                int i, totalOptions;

                fieldId = currentField.Id;
                textSummary = (DataSet.Field.Summary.Text)currentField.FieldSummary;

                //term options per field
                regex = "";
                foreach (KeyValuePair<string, string[]> termOptions in textSummary.TermForms)
                {
                    regex = "(\b|_)" + termOptions.Key + "(\b|_)";
                    totalOptions = termOptions.Value.Length;
                    for (i = 0; i < totalOptions; i++)
                    {
                        regex += "|(\b|_)" + termOptions.Value[i] + "(\b|_)";
                    }
                    options.Add(termOptions.Key, regex);
                }

                return options;
            }
コード例 #13
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);
 }
コード例 #14
0
 /// <summary>
 ///  Create a dataset using the supplied arguments.
 /// </summary>
 public Task<DataSet> Create(DataSet.Arguments arguments)
 {
     return Create<DataSet>(arguments);
 }
コード例 #15
0
 public Task<bool> Download(DataSet dataset, FileStream f)
 {
     return Download(dataset.Resource, f);
 }
コード例 #16
0
 public Task<DataSet> Create(Source source, string name = null, DataSet.Arguments arguments = null)
 {
     return CreateDataset(source, name, arguments);
 }