[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65170] [octave forge] (statistics) Failing BI
From: |
Rafael Laboissière |
Subject: |
[Octave-bug-tracker] [bug #65170] [octave forge] (statistics) Failing BIST in fitcknn |
Date: |
Tue, 16 Jan 2024 12:07:27 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65170>
Summary: [octave forge] (statistics) Failing BIST in fitcknn
Group: GNU Octave
Submitter: rlaboiss
Submitted: Tue 16 Jan 2024 05:07:27 PM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: other
Discussion Lock: Any
Operating System: GNU/Linux
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 16 Jan 2024 05:07:27 PM UTC By: Rafael Laboissière <rlaboiss>
One of the BISTs of function fitcknn of the statistics package, version 1.6.1,
is failing:
octave:1> pkg load statistics
octave:2> test fitcknn
***** test
x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1];
y = ["a"; "a"; "b"; "b"];
C = cov (x);
a = fitcknn (x, y, "Cov" , C, "distance", "mahalanobis");
assert (class (a), "ClassificationKNN");
assert ({a.DistParameter}, {C})
assert ({a.NSMethod, a.Distance}, {"exhaustive", "mahalanobis"})
assert ({a.BucketSize}, {50})
!!!!! test failed
ClassificationKNN: Cov must be a symmetric positive definite matrix.
According to the documentation, the argument "Cov" must be a positive definite
matrix. Now, in the BIST above, the C matrix is not positive definite.
Indeed:
octave:3> x = [1, 2, 3; 4, 5, 6; 7, 8, 9; 3, 2, 1];
octave:4> C = cov (x);
octave:5> [~, p] = chol (C)
p = 3
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65170>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65170] [octave forge] (statistics) Failing BIST in fitcknn,
Rafael Laboissière <=