We need your help! 🔥
Please consider disabling your ad-blocker to support this website! 🔑
We are a free, community-supported website! 🥰
We only display small unobtrusive ads which help us stay online! 💯
Thank you in advance! ❤️
Data
Data Sets
Generate
Machine Learning
Math
Mesh
Models
Panels
Serialization
Structure
Trainer Types
Util
Workflow

One Hot Encoding

Converts one or more input text columns into as many columns of one-hot encoded vectors. One-hot encoding is often used to convert categorical data into a form that can be provided to a machine learning algorithm.

Inputs

NameIDDescriptionType
DataDataThe data set to change.Generic
ColumnsColumnsThe names of the columns in the data set to encode.Text
Output KindOutput KindOutput Kind: \n (1) Bag - produces one vector such that each slot stores the number of occurances of the corresponding value in the input vector. Each slot in this vector corresponds to a value in the dictionary, so its length is the size of the built dictionary. Indicator and Bag differ simply in how the bit-vectors generated from individual slots in the input column are aggregated: for Indicator they are concatenated and for Bag they are added. When the source column is a Scalar, the Indicator and Bag options are identical.\n (2) Indicator - produces an indicator vector. Each slot in this vector corresponds to a category in the dictionary, so its length is the size of the built dictionary. If a value is not found in the dictioray, the output is the zero vector.\n (3) Key - produces keys in a KeyDataViewType column. If the input column is a vector, the output contains a vectory key type, where each slot of the vector corresponds to the respective slot of the input vector. If a category is not found in the bulit dictionary, it is assigned the value zero.\n (4) Binary - produces a binary encoded vector to represent the values found in the dictionary that are present in the input column. If a value in the input column is not found in the dictionary, the output is the zero vector.\nAny

Outputs

NameIDDescriptionType
DataDataThe modified data set.Generic

Video Tutorials

Site design © Robin Rodricks.   LunchBox and associated data © 2024 Nathan Miller.  
Rhinoceros and Grasshopper are registered trademarks of Robert McNeel & Associates.  Hosted by GitHub

Report an Issue  |  Terms of Service