SvmLightLoaderSaverCatalog.SaveInSvmLightFormat Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Save the IDataView in SVM-light format. Four columns can be saved: a label and a features column, and optionally a group ID column and an example weight column.
public static void SaveInSvmLightFormat (this Microsoft.ML.DataOperationsCatalog catalog, Microsoft.ML.IDataView data, System.IO.Stream stream, bool zeroBasedIndexing = false, bool binaryLabel = false, string labelColumnName = "Label", string featureColumnName = "Features", string rowGroupColumnName = default, string exampleWeightColumnName = default);
static member SaveInSvmLightFormat : Microsoft.ML.DataOperationsCatalog * Microsoft.ML.IDataView * System.IO.Stream * bool * bool * string * string * string * string -> unit
<Extension()>
Public Sub SaveInSvmLightFormat (catalog As DataOperationsCatalog, data As IDataView, stream As Stream, Optional zeroBasedIndexing As Boolean = false, Optional binaryLabel As Boolean = false, Optional labelColumnName As String = "Label", Optional featureColumnName As String = "Features", Optional rowGroupColumnName As String = Nothing, Optional exampleWeightColumnName As String = Nothing)
Parameters
- catalog
- DataOperationsCatalog
The DataOperationsCatalog catalog.
- data
- IDataView
The data view to save.
- stream
- Stream
The stream to write to.
- zeroBasedIndexing
- Boolean
Whether to index the features starting at 0 or at 1.
- binaryLabel
- Boolean
If set to true, saves 1 for positive labels, -1 for non-positive labels and 0 for NaN. Otherwise, saves the value of the label in the data view.
- labelColumnName
- String
The name of the column to be saved as the label column.
- featureColumnName
- String
The name of the column to be saved as the features column.
- rowGroupColumnName
- String
The name of the column to be saved as the group ID column. If null, a group ID column will not be saved.
- exampleWeightColumnName
- String
The name of the column to be saved as the weight column. If null, a weight column will not be saved.