我创建了一个包含句子和结果以及ID的.csv文件。我选择了情绪分析作为选项。我选择“结果”列作为要预测的列,并选择要输入的句子,但这给了我一个例外。
Id Result Sentiment Text
1 1 I loved the sunset that day.
2 0 I was not a fun experience.
3 1 I am happy.
4 0 Her mother died yesterday and I am really worried about her.
5 1 It was a good day filled with little children laughing in the part.
6 1 Both great!
7 0 The situation was strange and I was angry.
8 0 The car was very nasty, old and dirty.
9 1 I saw a cute couple holding hands on a sunny day.
10 0 I hate how some people do not listen to you.
11 0 I was sad because they didn't give me the promotion they promised.
12 0 I worked hard with no pay-off.
13 1 They gave me the best inventor award and I am excited.
14 1 I finally bought the quality laptop that I needed.
15 0 I can't believe he lied in front all of the staff.
错误是:
| Trainer Accuracy AUC AUPRC F1-score Duration #Iteration |
AUC is not defined when there is no positive class in the data
Parameter name: PosSample
AUC is not defined when there is no positive class in the data
Parameter name: PosSample
Value cannot be null.
Parameter name: items
Training failed with the exception: System.ArgumentNullException: Value cannot be null.
Parameter name: items
at System.Collections.Immutable.Requires.FailArgumentNullException(String parameterName)
at System.Collections.Immutable.ImmutableArray.Create[T](T[] items, Int32 start, Int32 length)
at Microsoft.ML.Trainers.FastTree.RegressionTreeBase..ctor(InternalRegressionTree tree)
at Microsoft.ML.Trainers.FastTree.TreeEnsembleModelParametersBasedOnRegressionTree.<>c.<CreateTreeEnsembleFromInternalDataStructure>b__5_0(InternalRegressionTree tree)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Microsoft.ML.Trainers.FastTree.TreeEnsemble`1..ctor(IEnumerable`1 trees, IEnumerable`1 treeWeights, Double bias)
at Microsoft.ML.Trainers.FastTree.TreeEnsembleModelParametersBasedOnRegressionTree.CreateTreeEnsembleFromInternalDataStructure()
at Microsoft.ML.Trainers.LightGbm.LightGbmBinaryTrainer.CreatePredictor()
at Microsoft.ML.Trainers.LightGbm.LightGbmTrainerBase`4.TrainModelCore(TrainContext context)
at Microsoft.ML.Trainers.TrainerEstimatorBase`2.TrainTransformer(IDataView trainSet, IDataView validationSet, IPredictor initPredictor)
at Microsoft.ML.Data.EstimatorChain`1.Fit(IDataView input)
at Microsoft.ML.AutoML.RunnerUtil.TrainAndScorePipeline[TMetrics](MLContext context, SuggestedPipeline pipeline, IDataView trainData, IDataView validData, String labelColumn, IMetricsAgent`1 metricsAgent, ITransformer preprocessorTransform, FileInfo modelFileInfo, DataViewSchema modelInputSchema, AutoMLLogger logger)