From c1afce2fcf4dd196d277b3ee5c98f215d9fe76ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20A=2E=20S=2E=20Silva?= <32930332+mrr00b00t@users.noreply.github.com> Date: Tue, 5 Oct 2021 17:39:43 -0300 Subject: [PATCH] =?UTF-8?q?Add=20OrderedFactor=20in=20the=20README.md=20ex?= =?UTF-8?q?ample.=20Multiclass=20example=20is=20alr=E2=80=A6=20(#6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add OrderedFactor in the README.md example. Multiclass example is already included. * Update README.md example. --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7f9836f..ecc4a31 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,19 @@ using TableDistances using ScientificTypes # create an heterogeneous table -table = (a=1:5, b=rand(5), c=[:A,:B,:C]) +table = (a=1:3, b=rand(3), c=["A", "B", "C"], d=[1, 2, 4]) +(a = 1:3, b = [0.7596581938450753, 0.6952806574889876, 0.6669145844749085], c = ["A", "B", "C"], d = [1, 2, 4]) # adjust the scientific types -t = coerce(table, :a => Count, :b => Continuous, :c => Multiclass) +t = coerce(table, :a => Count, :b => Continuous, :c => Multiclass, :d => OrderedFactor) +(a = 1:3, b = [0.7596581938450753, 0.6952806574889876, 0.6669145844749085], c = CategoricalArrays.CategoricalValue{String, UInt32}["A", "B", "C"], d = CategoricalArrays.CategoricalValue{Int64, UInt32}[1, 2, 4]) # compute the pairwise distance between rows D = pairwise(TableDistance(), t) +3×3 Matrix{Float64}: + 0.0 1.09707 1.75 + 1.09707 0.0 0.902927 + 1.75 0.902927 0.0 ``` Default distances from various packages such as