【问题标题】:Bad Request Response from Azure Machine LearningAzure 机器学习的错误请求响应
【发布时间】:2016-03-14 21:11:32
【问题描述】:

我在 Azure 机器学习中有一个 R 脚本,它需要两个输入。从那以后,我一直致力于一个项目,该项目将利用我在 Azure 中创建的 Web 服务。当我使用整数作为值时,一切正常。在我的 C# 代码中,这些值仍然是双精度值,我使用 ToString 为 HTTP 请求格式化它们。我可以发送数据,并获得 100% 准确的结果。但是,当我发送实际包含小数点后数字的值时,我会收到错误的请求响应。我认为问题在于 R 脚本如何从 Azure 机器学习输入中读取数据。到目前为止,我有这个:

#R Script in Azure ML:
1:    objCoFrame <- maml.mapInputPort(2) # class: data.frame
2:    objCoVector <- as.vector(objCoFrame[1,])

这是用整数做的。我也试过了

2:    objCoVector <- as.vector(as.numeric(objCoFrame[1,]))

但得到了相同的结果。

错误的请求响应内容如下:

{
    "error":
    {
        "code":"BadArgument",
        "message":"Invalid argument provided.",
        "details":
        [{
            "code":"InputParseError",
            "target":"rhsValues",
            "message":"Parsing of input vector failed.  Verify the input vector has the correct number of columns and data types.  Additional details: Input string was not in a correct format.."
        }]
    }
}

【问题讨论】:

    标签: r azure-machine-learning-studio


    【解决方案1】:

    你可以在传递给execute-R之前使用Meta-Editor强制类型

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-18
      • 2012-11-20
      • 1970-01-01
      • 2015-03-15
      • 1970-01-01
      相关资源
      最近更新 更多