help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: kmeans is not right


From: John Guin
Subject: RE: kmeans is not right
Date: Tue, 8 Dec 2015 20:24:01 -0800


-----Original Message-----
From: Philip Nienhuis [mailto:address@hidden 
Sent: Tuesday, December 8, 2015 12:20 PM
To: John Guin <address@hidden>; address@hidden
Subject: Re: kmeans is not right

John Guin wrote:
>
>
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of 
> PhilipNienhuis
> Sent: Tuesday, December 08, 2015 9:41 AM
> To: address@hidden
> Subject: RE: kmeans is not right
>
> John Guin wrote
>> -----Original Message-----
>> From: help-octave-bounces+johnguin=
>
>> hotmail.com@
>
>> [mailto:help-octave-bounces+johnguin=
>
>> hotmail.com@
>
>> ] On Behalf Of John
>> Guin
>> Sent: Tuesday, December 08, 2015 7:26 AM
>> To: 'JokerOne' &lt;
>
>> address@hidden
>
>> &gt;;
>
>> help-octave@
>
>> Subject: RE: kmeans is not right
>>
>> Does the statistics package work with Octave 4.0?  When I try to 
>> install, I get an error that statistics needs io >= 1.0.18.  I have 
>> io
>> 2.2.11 installed.
>>
>> Win7, if that matters.
>>
>> John
>>
>>
>> -----Original Message-----
>> From: help-octave-bounces+johnguin=
>
>> hotmail.com@
>
>> [mailto:help-octave-bounces+johnguin=
>
>> hotmail.com@
>
>> ] On Behalf Of
>> JokerOne
>> Sent: Tuesday, December 08, 2015 3:55 AM
>> To:
>
>> help-octave@
>
>> Subject: Re: kmeans is not right
>>
>> kmeans is a function of the statistics package. It is not a package 
>> of its own.
>>
>> use
>> pkg install -forge statistics
>>
>> then see:
>> http://octave.sourceforge.net/statistics/function/kmeans.html
>>
>>
>> -------------------
>>
>> Found the error - just having the io package installed is not sufficient.
>> You need to force load the io package before installing statistics:
>>
>> pkg load io
>>
>> then statistics will install without error.
>>
>> Should I file a bug to have the error message say " statistics needs 
>> io >= 1.0.18 (is the package loaded?)"
>>
>> It would be wordier, but might point people in the right direction.
>>
>> (or just try to load required packages at pkg install time...)
>
> Hmmm.... never knew that packages need to be loaded in order to be 
> found by the pkg.m function.
>
> Remarkable, as it is the pkg.m function that writes the 
> octave_packages file in which the package database is kept.
>
> A bug report would do well if this is reproducible. I never 
> encountered this.
>
> BTW you can also install packages with the -nodeps flag. Dependency 
> checks are skipped then (at your own risk, that is).
>
> Philip
>
>
>
> -----------------
>
> Are there setup logs I can get that would help diagnose this?  I have 
> a second machine to try and repro and would love to get some 
> actionable logs/reports rather than just posting a bug that no one else
can repro.

You could try something like:

diary on
:
pkg install ......
:
diary off
diary <filename>

and report the results.
(Use "help diary" for details on how to use it.)

Anyway I cannot reproduce this issue.
In Octave-4.0.0 for Windows the build_packages.m command installs one OF
package after the other using a declared function ("try-install) that in
turn calls pkg.m.
After one OF package is installed, build_packages.m simply invokes
try-install to install the next. Although there's a certain order in which
build_packages.m installs packages (to satisfy dependencies) no packages are
loaded at all in between. So I conclude that the pkg.m command merely checks
for *presence* (being installed) of dependency packages rather that rely on
dependencies being loaded.

To summarize: I find it odd that pkg.m requires a package (io in this
case) to be loaded to be able to recognize it as a dependency (for the
statistics package).

Philip


-------

I opened bug http://savannah.gnu.org/bugs/index.php?46640 to track this.  I
can repro on a second machine but diary did not work.  Odd.

John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]