Reputation: 87
The pre-processing page in the cloud ML How to guide (https://cloud.google.com/ml/docs/how-tos/preprocessing-data) says that you should see the SDK reference documentation for details about each type of feature and the
Can anyone point me to this documentation or a list of feature types and their methods? I'm trying to setup a discrete target but keep getting "data type int64 expected type: float" errors whenever I set my target to .discrete() rather than .continuous()
Upvotes: 0
Views: 101
Reputation: 100
On the type-related errors, let's assume for a bit that your feature set is specified somewhat along the following lines:
feature_set = {
'target': features.target('category').discrete()
}
When a discrete target is specified like above, the data-type of the target feature is an int64 due to one of the following:
Under these circumstances, if a float is encountered, the transformation to the target feature's data-type will fail.
Instead, casting the entire data-column ('category' in this case) into a float should help with this.
Upvotes: 0
Reputation: 26
You need to download the SDK reference documentation:
Navigate to the directory where you want to install the docs in the
command line. If you used ~/google-cloud-ml
to download the samples
as recommended in the setup guide, it's a good place.
Copy the documentation archive to your chosen directory using
gsutil
:
gsutil cp gs://cloud-ml/sdk/cloudml-docs.latest.tar.gz .
Unpack the archive:
tar -xf cloudml-docs.latest.tar.gz
This creates a docs
directory inside the directory that you chose. The
documentation is essentially a local website: open docs/index.html
in your browser to open it at its root. You can find the transform references in there.
(This information is now in the setup guide as well. It's the final step under LOCAL: MAC/LINUX)
Upvotes: 1