Tractables / ProbabilisticCircuits.jl

Probabilistic Circuits from the Juice library
https://tractables.github.io/ProbabilisticCircuits.jl/dev
Apache License 2.0
104 stars 11 forks source link

added one-hot encoding #10

Closed ashish180199 closed 4 years ago

ashish180199 commented 4 years ago

Hello, I am working under Yitao in the weak-supervision project. This function enables one-hot encoding of data so that binary PSDDs can be created.

Test examples - example1 = [2 1 3; 3 2 3] example2 = [true false] example3 = ['a' 'a' 'b' 'd'; 'd' 'a' 'c' 'c'; 'b' 'a' 'c' 'd'] categories1 = [1, 2, 3] categories2 = [false, true] categories3 = ['d', 'c', 'b', 'a']