-
-
Save mdfarragher/01ecd04a211db0bf89507d3883586b16 to your computer and use it in GitHub Desktop.
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
/// <summary> | |
/// The ProcessedData class contains one single spam/ham message which has been processed | |
/// by the machine learning pipeline. | |
/// </summary> | |
public class ProcessedData | |
{ | |
public string Label { get; set; } | |
public VBuffer<float> Features { get; set; } | |
public float[] GetFeatures() => (float[])Features.DenseValues().ToArray(); | |
public float GetLabel() => Label == "spam" ? 1.0f : 0.0f; | |
} | |
// the rest of the code goes here... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment