问题标签 [google-prediction]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
google-app-engine - 使用 JSON 数据学习 Google Prediction API
我发现了一些使用 Google Prediction API 的示例,但示例中只使用了 CSV 数据。我想向 Prediction API 提供这样组织的数据:
是否可以使用此类数据来学习模型,或者我只能使用 CSV?
google-app-engine - Google 应用引擎和预测 API(错误导入)
请帮我解决这个错误?我在应用引擎(https://developers.google.com/appengine/articles/prediction_service_accounts)上做这个练习,但我被困在步骤 6.2 因为我提出了这个错误(当我运行部署操作时,它是成功的步骤 6.1):
:没有名为 appengine Traceback 的模块(最近一次调用最后一次):文件“/base/data/home/apps/s~01prediction/1.367567721220366691/main.py”,第 29 行,从 oauth2client.appengine 导入 AppAssertionCredentials
第 29 行的错误: from oauth2client.appengine import AppAssertionCredentials
api - 在 Google App Engine 之外使用 Google Prediction API?
我尝试搜索有关预测未来趋势的算法,发现 Google Prediction API 非常适合我。我想在我的项目中使用它,但我找不到任何关于他们的 RESTful API 的有用信息,他们的示例仅适用于 Google App Engine。
Google Prediction API 可以在 App Engine 之外使用,以便我可以在我的项目中使用它吗?
google-prediction - 可以在 Google 预测中重复使用 TrainedModel 吗?
我正在使用带有“PredictionSample.java”示例程序的 Google Prediction v1.5(Java 客户端)。
在“PredictionSample.java”中,我将“MODEL_ID”指定为“mymodel”,将“APPLICATION_NAME”指定为“MyApplication”,并使用存储在我的 Google Cloud Storage 存储桶中的“language_id.txt”训练模型。示例程序运行良好,并使用一些输入特征执行多个预测。
但是,我想知道“mymodel”TrainedModel 存储在哪里。它是否存储在我的“Google API 控制台”项目下?(但似乎我在“Google API 控制台”项目中找不到“mymodel”)
在 Google Prediction API 的常见问题解答中,它说“您当前无法下载您的模型。”。似乎 TrainedModel(“mymodel”)存储在 Google 预测服务器中的某个位置。我想知道实际的商店位置到底在哪里,以及如何重新使用这个 TrainedModel 来使用 Google Prediction v1.5 Java 客户端执行预测(即在未来的预测中不重新训练模型)。
有没有人对此有想法。感谢您的任何建议。
google-prediction - 是否有任何用于更新 Google Prediction TrainedModel 的 Java 客户端示例?
我正在使用带有“PredictionSample.java”示例程序的 Google Prediction v1.5 Java 客户端。我想知道是否有任何用于创建“com.google.api.services.prediction.model.Update”对象的jave 示例。我已经使用“language_id.txt”文件训练了一个模型,并希望使用新的训练实例更新训练好的模型。
看来我可以使用
创建“com.google.api.services.prediction.model.Update”对象,但不清楚如何使用“Update”对象的“setCsvInstance”和“setOutput”方法正确输入新的训练实例。此外,尚不清楚如何在“setOutput”方法中区分“回归”数值和“分类”字符串值,因为该方法似乎只接受Java“字符串”值。
任何人都可以建议这种用法的代码。感谢您的任何建议。
python - Predicton API + GAE:无效凭证
我正在尝试让我的 GAE (python) 应用程序与预测 API 对话,但我不断收到 HttpError: <HttpError 401 when requesting ... returned "Invalid Credentials">
我拥有的 GAE 代码是:
- 所有导入的库都是 Google 的 python API 库,并且正在正确导入。
- 我正在使用我的应用程序的“服务器应用程序密钥”API 密钥作为 api_key,因为我知道这对于我的用例来说是正确的,因为我的应用程序直接尝试与预测 API 对话
出于某种原因,这不起作用。我已直接从此页面获取此代码并根据我的需要对其进行了调整:https ://developers.google.com/prediction/docs/developer-guide#predictionfromappengine
事实上,如果我复制并粘贴相同的代码,我仍然会收到Invalid Credentials
错误消息。
有什么建议么?
python - Module object has no attribute 'argpaser' ---- Python
I'm having an error on a python file. What it does is to get acces to an specific google API. OAuth2.0. But that's not the wrong part. The wrong part takes part of argparse (Retriving arguments from console by adding --something="").
Here's my code:
On this line--> parent_parsers = [tools.argparser]
I'm having that error:
line 75, in main parent_parsers = [tools.argparser] AttributeError: 'module' object has no attribute 'argparser'
The tools.py file is that one:
I don't understand the meaning of the error, it may be an import issue but I don't know. Thanks!
google-app-engine - java.security.AccessControlException:访问被拒绝
我已经创建了使用 Prediction Api 1.5v 的 Google 应用程序引擎项目。当我使用带有客户端 ID 和客户端密码的 Google o2Auth 身份验证在本地平均 localhost:8888 上运行它时,它工作正常。但是当我实时运行它时它会给出一个错误
java.security.AccessControlException:访问被拒绝(“java.io.FilePermission”“/base/data/home/apps/s~charn-project/1.369216781240579013/.credentials”“写”)
我的 o2auth 代码是
GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(Database.class.getResourceAsStream("/client_secrets.json"))); System.out.println("cl"+clientSecrets.getDetails().getClientSecret());
可能问题出在这一行
FileCredentialStore credentialStore = new FileCredentialStore(new File(System.getProperty("user.home"), ".credentials/prediction.json"), JSON_FACTORY);
machine-learning - 谷歌预测最大 CSV 大小?
我在 Google Cloud Storage 上上传了一个 1.8Gb 的 CSV 文件。
当我从Google API Explorer开始训练时,出现错误:
我很困惑。从常见问题解答中,我可以阅读:
预测 API 支持哪些训练数据?
可以通过以下三种方式之一提供训练数据:
CSV 格式的训练数据文件,最大 2.5GB,加载到 Google 存储中。
从定价页面:
训练:
0.002 美元/MB 批量训练(每个数据集的最大大小:250MB)
这个 250MB 和 2.5GB 有什么区别?
google-prediction - 仅获取 Google 预测的前 10 名结果,而不是所有结果
我已经实现了一个模型,将传入的数据映射到 1000 个可用类别(标签)中的一个。对于每个条目,Google 预测返回 1000 中的所有类别。有没有什么方法可以让 Google 预测返回,例如,只返回 10 个最重要的结果?
谢谢