C# 值在Azure ML Studio Web服务之后更改

C# 值在Azure ML Studio Web服务之后更改,c#,web-services,azure-machine-learning-studio,C#,Web Services,Azure Machine Learning Studio,我使用Azure ML Studio来预测一些值。我注意到,当我从Web服务收到结果时,我的一个值发生了变化。事实上,我有以下数组[27,72018,11,2,4,1],它们变成[27,72018,11,2,4,0]。这是我第一次注意到这样的行为。我在csv中没有看到其他值发生更改。它总是发生在我的实际输入中。我不知道从哪里开始寻找问题的根源 我试着这样解读回应: HttpResponseMessage response = await client.PostAsJsonAsync("", sc

我使用Azure ML Studio来预测一些值。我注意到,当我从Web服务收到结果时,我的一个值发生了变化。事实上,我有以下数组[27,72018,11,2,4,1],它们变成[27,72018,11,2,4,0]。这是我第一次注意到这样的行为。我在csv中没有看到其他值发生更改。它总是发生在我的实际输入中。我不知道从哪里开始寻找问题的根源

我试着这样解读回应:

HttpResponseMessage response = await client.PostAsJsonAsync("", scoreRequest);
if (response.IsSuccessStatusCode)
{
    string result = await response.Content.ReadAsStringAsync();
}
HttpResponseMessage response = await client.PostAsJsonAsync("", scoreRequest);

if (response.IsSuccessStatusCode)
{
    var tmp3 = await response.Content.ReadAsStreamAsync();
    var tmp4 = ReadFully(tmp3);
    var tmp5 = System.Text.Encoding.UTF8.GetString(tmp4);
}

public static byte[] ReadFully(Stream input)
    {
        byte[] buffer = new byte[16 * 1024];
        using (MemoryStream ms = new MemoryStream())
        {
            int read;
            while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
            {
                ms.Write(buffer, 0, read);
            }
            return ms.ToArray();
        }
    }
这样:

HttpResponseMessage response = await client.PostAsJsonAsync("", scoreRequest);
if (response.IsSuccessStatusCode)
{
    string result = await response.Content.ReadAsStringAsync();
}
HttpResponseMessage response = await client.PostAsJsonAsync("", scoreRequest);

if (response.IsSuccessStatusCode)
{
    var tmp3 = await response.Content.ReadAsStreamAsync();
    var tmp4 = ReadFully(tmp3);
    var tmp5 = System.Text.Encoding.UTF8.GetString(tmp4);
}

public static byte[] ReadFully(Stream input)
    {
        byte[] buffer = new byte[16 * 1024];
        using (MemoryStream ms = new MemoryStream())
        {
            int read;
            while ((read = input.Read(buffer, 0, buffer.Length)) > 0)
            {
                ms.Write(buffer, 0, read);
            }
            return ms.ToArray();
        }
    }
这是Azure ML上我的模型的形状(在左上角、右上角和底部python脚本中应用了随机林):

我猜你在做两个类谓词,1,0应该是“得分标签”的结果。

你的模型是什么样子的?