C# Class VW.Serializer.VowpalWabbitJsonSerializer

A deserializer from JSON to Vowpal Wabbit native examples.
Inheritance: IDisposable
显示文件 Open project: NativoPlatform/vowpal_wabbit Class Usage Examples

Public Methods

Method Description
CreateExamples ( ) : VowpalWabbitExampleCollection

Creates the examples ready for learning or prediction.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetNumberOfActionDependentExamples ( JsonReader reader, string multiProperty = PropertyConfiguration.MultiPropertyDefault ) : int
GetNumberOfActionDependentExamples ( string json ) : int
Parse ( JsonReader reader, ILabel label = null, int index = null ) : void

Parses the example.

Parse ( string json, ILabel label = null, int index = null ) : void

Parses the example.

ParseAndCreate ( JsonReader reader, ILabel label = null, int index = null ) : VowpalWabbitExampleCollection

Parses the example.

ParseAndCreate ( string json, ILabel label = null, int index = null ) : VowpalWabbitExampleCollection

Parses and creates the example.

VowpalWabbitJsonSerializer ( IVowpalWabbitExamplePool vwPool ) : Newtonsoft.Json

Initializes a new instance of the VowpalWabbitJson class.

Private Methods

Method Description
Dispose ( bool disposing ) : void

Method Details

CreateExamples() public method

Creates the examples ready for learning or prediction.
public CreateExamples ( ) : VowpalWabbitExampleCollection
return VowpalWabbitExampleCollection

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

GetNumberOfActionDependentExamples() public static method

public static GetNumberOfActionDependentExamples ( JsonReader reader, string multiProperty = PropertyConfiguration.MultiPropertyDefault ) : int
reader Newtonsoft.Json.JsonReader
multiProperty string
return int

GetNumberOfActionDependentExamples() public static method

public static GetNumberOfActionDependentExamples ( string json ) : int
json string
return int

Parse() public method

Parses the example.
public Parse ( JsonReader reader, ILabel label = null, int index = null ) : void
reader Newtonsoft.Json.JsonReader The example to parse.
label ILabel /// Optional label, taking precedence over "_label" property found in . /// If null, will be inspected and the "_label" property used as label. ///
index int Optional index of example the given label should be applied for multi-line examples.
return void

Parse() public method

Parses the example.
public Parse ( string json, ILabel label = null, int index = null ) : void
json string The example to parse.
label ILabel /// Optional label, taking precedence over "_label" property found in . /// If null, will be inspected and the "_label" property used as label. ///
index int Optional index of example the given label should be applied for multi-line examples.
return void

ParseAndCreate() public method

Parses the example.
public ParseAndCreate ( JsonReader reader, ILabel label = null, int index = null ) : VowpalWabbitExampleCollection
reader Newtonsoft.Json.JsonReader The example to parse.
label ILabel /// Optional label, taking precedence over "_label" property found in . /// If null, will be inspected and the "_label" property used as label. ///
index int Optional index of example the given label should be applied for multi-line examples.
return VowpalWabbitExampleCollection

ParseAndCreate() public method

Parses and creates the example.
public ParseAndCreate ( string json, ILabel label = null, int index = null ) : VowpalWabbitExampleCollection
json string The example to parse.
label ILabel /// Optional label, taking precedence over "_label" property found in . /// If null, will be inspected and the "_label" property used as label. ///
index int Optional index of example the given label should be applied for multi-line examples.
return VowpalWabbitExampleCollection

VowpalWabbitJsonSerializer() public method

Initializes a new instance of the VowpalWabbitJson class.
public VowpalWabbitJsonSerializer ( IVowpalWabbitExamplePool vwPool ) : Newtonsoft.Json
vwPool IVowpalWabbitExamplePool
return Newtonsoft.Json