Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
348 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace BigML | ||
{ | ||
public partial class OptiML | ||
{ | ||
public class Arguments : Arguments<OptiML> | ||
{ | ||
public Arguments() | ||
{ | ||
|
||
} | ||
|
||
/// <summary> | ||
/// A valid dataset/id. | ||
/// </summary> | ||
public string DataSet | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
|
||
public override JObject ToJson() | ||
{ | ||
dynamic json = base.ToJson(); | ||
|
||
if(!string.IsNullOrWhiteSpace(DataSet)) json.dataset = DataSet; | ||
return json; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace BigML | ||
{ | ||
public partial class Client | ||
{ | ||
/// <summary> | ||
/// Create a OptiML using supplied arguments. | ||
/// </summary> | ||
public Task<OptiML> CreateOptiML(OptiML.Arguments arguments) | ||
{ | ||
return Create<OptiML>(arguments); | ||
} | ||
|
||
/// <summary> | ||
/// Create a OptiML. | ||
/// </summary> | ||
/// <param name="dataset">A DataSet instance</param> | ||
/// <param name="name">The name you want to give to the new OptiML. </param> | ||
/// <param name="arguments">The other parameters you want to specify (description, tags, etc.)</param> | ||
public Task<OptiML> CreateOptiML(DataSet dataset, string name = null, | ||
OptiML.Arguments arguments = null) | ||
{ | ||
arguments = arguments ?? new OptiML.Arguments(); | ||
if (!string.IsNullOrWhiteSpace(name)) | ||
arguments.Name = name; | ||
arguments.DataSet = dataset.Resource; | ||
return Create<OptiML>(arguments); | ||
} | ||
|
||
/// <summary> | ||
/// List all the OptiMLs | ||
/// </summary> | ||
public Query<OptiML.Filterable, OptiML.Orderable, OptiML> ListOptiMLs() | ||
{ | ||
return new OptimlListing(List<OptiML>); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using BigML.Meta; | ||
|
||
namespace BigML | ||
{ | ||
public partial class OptiML | ||
{ | ||
/// <summary> | ||
/// Filterable properties for OptiML | ||
/// </summary> | ||
public class Filterable : Filterable<OptiML> | ||
{ | ||
/// <summary> | ||
/// The dataset/id that was used to build the OptiML. | ||
/// </summary> | ||
public String Dataset | ||
{ | ||
get { return Object.dataset; } | ||
} | ||
|
||
/// <summary> | ||
/// Whether the dataset is still available or has been deleted. | ||
/// </summary> | ||
public Bool DatasetStatus | ||
{ | ||
get { return Object.dataset_status; } | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace BigML | ||
{ | ||
/// <summary> | ||
/// An OptiML is an automated optimization process for model selection and | ||
/// parameterization (or hyper-parameterization) to solve classification | ||
/// and regression problems. | ||
/// The complete and updated reference with all available parameters is in | ||
/// our <a href="https://bigml.com/api/optimls">documentation</a> website. | ||
/// </summary> | ||
public partial class OptiML : Response | ||
{ | ||
|
||
/// <summary> | ||
/// The name of the OptiML as your provided or based on the name | ||
/// of the dataset by default. | ||
/// </summary> | ||
public string Name | ||
{ | ||
get { return Object.name; } | ||
} | ||
|
||
|
||
/// <summary> | ||
/// The dataset/id that was used to build the OptiML. | ||
/// </summary> | ||
public string DataSet | ||
{ | ||
get { return Object.dataset; } | ||
} | ||
|
||
|
||
|
||
/// <summary> | ||
/// Whether the dataset is still available or has been deleted. | ||
/// </summary> | ||
public bool DataSetStatus | ||
{ | ||
get { return Object.dataset_status; } | ||
} | ||
|
||
|
||
/// <summary> | ||
/// A description of the status of the OptiML. It includes a code, a message, | ||
/// and some extra information. | ||
/// </summary> | ||
public Status StatusMessage | ||
{ | ||
get { return new Status(Object.status); } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace BigML | ||
{ | ||
public class OptimlListing : Query<OptiML.Filterable, OptiML.Orderable, OptiML> | ||
{ | ||
public OptimlListing(Func<string, Task<Listing<OptiML>>> client) | ||
: base(client) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using BigML.Meta; | ||
|
||
namespace BigML | ||
{ | ||
using Meta.Key; | ||
|
||
public partial class OptiML | ||
{ | ||
/// <summary> | ||
/// Orderable properties for OptiMLs | ||
/// </summary> | ||
public class Orderable : Orderable<OptiML> | ||
{ | ||
/// <summary> | ||
/// The dataset/id that was used to build the OptiML. | ||
/// </summary> | ||
public String Dataset | ||
{ | ||
get { return Object.dataset; } | ||
} | ||
|
||
/// <summary> | ||
/// Whether the dataset is still available or has been deleted. | ||
/// </summary> | ||
public Bool DatasetStatus | ||
{ | ||
get { return Object.dataset_status; } | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace BigML | ||
{ | ||
public partial class OptiML | ||
{ | ||
/// <summary> | ||
/// Creating an OptiML is a process that can take just a few | ||
/// seconds or a few hours depending on the size of the dataset used as | ||
/// input and on the work load of BigML's systems. | ||
/// The OptiML goes through a number of states until its completed. | ||
/// Through the status field in the OptiML you can determine when the | ||
/// OptiML has been fully processed and ready to be used in scatterplot. | ||
/// </summary> | ||
public class Status : Status<OptiML> | ||
{ | ||
internal Status(JObject status): base(status) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// How far BigML.io has progressed processing the OptiML. | ||
/// </summary> | ||
public double Progress | ||
{ | ||
get { return _status.progress; } | ||
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
To run and develop you should use dotnet framework 4.5 | ||
To develop to need visual studio 2012 (version 11) or higher. | ||
To develop to need visual studio 2015 (version 14) or higher. | ||
To add the reference "Newtonsoft.Json" you need to run in the package manager: | ||
PM> Install-Package Newtonsoft.Json -Version 9.0.1 BigML | ||
PM> Install-Package Newtonsoft.Json -Version 11.0.1 BigML |
Oops, something went wrong.