-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSentimentData.cs
43 lines (37 loc) · 1.08 KB
/
SentimentData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using Microsoft.ML.Data;
namespace SentimentAnalysis
{
/*
* Input dataset class
*
* float - value for sentiment
* either positive or negative
* string - for the comment
*/
public class SentimentData
{
[Column(ordinal: "0", name: "Label")]
public float Sentiment;
[Column(ordinal: "1")]
public string SentimentText;
}
/*
* Prediction after the model has been trained
*
* The boolean Sentiment and PredictedLabel column
* The label is used to create and train the model
* Also used with a second dataset to evaluate the model
* The PredictedLabel is used during evaluation and prediction
* For evaluation, an input with triaing data, the
* predicted values, and the model are used
*/
public class SentimentPrediction
{
[ColumnName("PredictedLabel")]
public bool Prediction { get; set; }
[ColumnName("Probability")]
public float Probability { get; set; }
[ColumnName("Score")]
public float Score { get; set; }
}
}