@@ -13,10 +13,10 @@ The One Hot Encoding function is used to convert categorical data into a numeric
1313[[algorithms-one-hot-encoding-sample]]
1414== One Hot Encoding sample
1515
16- A One Hot Encoding will return a list equal to the length of the `available values`.
17- A 1 will appear in that list for each of the `selected values` , and a 0 for any unselected values .
16+ One hot encoding will return a list equal to the length of the `available values`.
17+ In the list, `selected values` are represented by `1` , and `unselected values` are represented by `0` .
1818
19- .The following will run the algorithm on hardcoded lists
19+ .The following will run the algorithm on hardcoded lists:
2020[source, cypher]
2121----
2222include::scripts/one-hot-encoding.cypher[tag=basic]
@@ -26,7 +26,7 @@ include::scripts/one-hot-encoding.cypher[tag=basic]
2626.Results
2727[opts="header",cols="1"]
2828|===
29- | Vector
29+ | `vector`
3030| [0,0,1]
3131|===
3232// end::basic-result[]
@@ -37,7 +37,7 @@ include::scripts/one-hot-encoding.cypher[tag=basic]
3737include::scripts/one-hot-encoding.cypher[tag=create-sample-graph]
3838----
3939
40- .The following will return a one hot encoding for each user and the types of cuisine that they like
40+ .The following will return a one hot encoding for each user and the types of cuisine that they like:
4141[source, cypher]
4242----
4343include::scripts/one-hot-encoding.cypher[tag=one-hot-encoding-query]
@@ -59,13 +59,13 @@ include::scripts/one-hot-encoding.cypher[tag=one-hot-encoding-query]
5959[opts="header",cols="1,1,1,1,4"]
6060|===
6161| Name | Type | Default | Optional | Description
62- | availableValues | list | null | yes | The available values. If null, the function will return an empty list
63- | selectedValues | list | null | yes | The selected values. If null, the function will return a list of all 0's
62+ | ` availableValues` | list | null | yes | The available values. If null, the function will return an empty list.
63+ | ` selectedValues` | list | null | yes | The selected values. If null, the function will return a list of all 0's.
6464|===
6565
6666.Results
6767[opts="header",cols="1,6"]
6868|===
6969| Type | Description
70- | list | One hot encoding of the selected values
70+ | ` list` | One hot encoding of the selected values.
7171|===
0 commit comments