r - 来自 Azure 机器学习的错误请求响应

标签 r azure-machine-learning-service

我在 Azure 机器学习中有一个 R 脚本,需要两个输入。此后我一直致力于一个项目,该项目将利用我在 Azure 中创建的 Web 服务。当我使用整数作为值时,一切正常。在我的 C# 代码中,这些值仍然是 double 值,我使用 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.."
        }]
    }
}

最佳答案

您可以在传递给execute-R之前使用元编辑器强制类型

关于r - 来自 Azure 机器学习的错误请求响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35998155/

相关文章:

azure - 为什么 Azure ML studio 中用于数据漂移监控的字段 "compute target"仍然为空,而我有一个计算实例?

Azure:如何安排 AzureML 脚本需要 1-5 天才能完成?

R脚本: "Error: (list) object cannot be coerced to type double"

python - 用于 Azure ML 中特征提取的 TfidfVectorizer 和 sublinear_tf 缩放

删除 data.frame 中包含其他列的行

r - 将两个 sampleID 的相应值连接到一个新的单列中

r - Leaflet colorQuantile 'breaks' 不是唯一的

R 概率回归边际效应

r - 查找数据框中字符串的百分比,但每行只计算一次

azure - 如何配置YOLOv8 yaml文件来访问Azure上的blob存储数据集?