зеркало из https://github.com/microsoft/mwt-ds.git
fixed ActionProb/ActionScore
This commit is contained in:
Родитель
ef017f6906
Коммит
d031b74067
|
@ -92,10 +92,10 @@ namespace Experimentation
|
|||
});
|
||||
}
|
||||
|
||||
// var pred = vw.Learn(line, VowpalWabbitPredictionType.ActionScore);
|
||||
// var pred = vw.Learn(line, VowpalWabbitPredictionType.ActionProbabilities);
|
||||
using (var example = jsonSerializer.ParseAndCreate(line))
|
||||
{
|
||||
var pred = example.Learn(VowpalWabbitPredictionType.ActionScore);
|
||||
var pred = example.Learn(VowpalWabbitPredictionType.ActionProbabilities);
|
||||
|
||||
prediction.WriteLine(JsonConvert.SerializeObject(
|
||||
new
|
||||
|
@ -160,7 +160,7 @@ namespace Experimentation
|
|||
// var learnBlock = new TransformBlock<Event, Event>(
|
||||
// evt =>
|
||||
// {
|
||||
// evt.Prediction = evt.Example.Learn(VowpalWabbitPredictionType.ActionScore);
|
||||
// evt.Prediction = evt.Example.Learn(VowpalWabbitPredictionType.ActionProbabilities);
|
||||
// evt.Example.Dispose();
|
||||
// return evt;
|
||||
// },
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace ClientDecisionServiceTest
|
|||
DateTime timeStamp = DateTime.UtcNow;
|
||||
|
||||
var context = new FoodContext { Actions = new int[] { 1, 2, 3 }, UserLocation = location };
|
||||
ActionScore[] predicts = vw.Predict(context, VowpalWabbitPredictionType.ActionScore);
|
||||
ActionScore[] predicts = vw.Predict(context, VowpalWabbitPredictionType.ActionProbabilities);
|
||||
Assert.AreEqual(expectedActions[location], predicts[0].Action + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace Microsoft.Research.MultiWorldTesting.ClientLibrary
|
|||
}
|
||||
}
|
||||
|
||||
var vwPredictions = vw.Predict(context, VowpalWabbitPredictionType.ActionScore);
|
||||
var vwPredictions = vw.Predict(context, VowpalWabbitPredictionType.ActionProbabilities);
|
||||
|
||||
// VW multi-label predictions are 0-based
|
||||
var ap = vwPredictions
|
||||
|
|
Загрузка…
Ссылка в новой задаче