help-octave
[Top][All Lists]
Advanced

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

Re: R: Issue in installing Pm


From: Tatsuro MATSUOKA
Subject: Re: R: Issue in installing Pm
Date: Thu, 9 Mar 2017 12:03:49 +0900 (JST)


>>> 
>>>  Dear Help Octave,
>>>   
>>>  I have been trying to install Pmtk3 in Octave but I keep receiving the 
>>  message below:
>>>   
>>>  Iteration   FunEvals     Step Length    Function Val        Opt Cond
>>>           1          2    6.75744e-001    6.42259e+000    3.08556e-001
>>>  error: 'lbfgsC' undefined near line 527 column 25
>>>  error: called from
>>>      minFunc at line 527 column 23
>>>      logregFit at line 139 column 45
>>>      logregL2FitTest at line 20 column 8
>>>      testPmtk3 at line 61 column 1
>>>>>    
>>>   
>>>  Does anyone know what to do in this case?
>>>   
>>>  Look Forward
>>>   
>>>  Best 
>>>   
>>>  Michele
>> 
>> 
>>  Your question is difficult to answer due to inadequate information.
>> 
>>  Clarify the below
>> 
>>  1. Octave environments
>>   platform (windows 10, ubunutu 16.04 etcs)
>>   version of octave (4.0.0, 4.2.1 etcs)
>> 
>>  2. Way of install of Pmtk3
>> 
>>  3. octave command or script you tried.
>> 
>>  Tatsuro
>> 
> 
> 
> Seem to be related to
> lbfgsC cannot be found #79 
> https://github.com/probml/pmtk3/issues/79
> 
> 
> 
> Workaround is described the above
> 
> However, lbfgs  seem not to implemented on octave nor matlab.
> 
> You seem to have build the below by yourself.
> https://jp.mathworks.com/matlabcentral/fileexchange/15061-matlab-interface-f
> or-l-bfgs-b/content/lbfgsb-for-matlab/README.html
> 


Thanks for reply

I tried to trace what you did on octave-4.2.1 64bit on windows 10 home.


>> initPmtk3
initializing pmtk3
error: run initPmtk3Octave instead
error: called from
    initPmtk3 at line 17 column 5


So I run initPmtk3Octave instead.

Then I executed 

>> testPmtk3
Checking initialization..........PASSED
Checking pmtkSupport packages....PASSED
Checking pmtkData................warning: load: 'C:\pmtk3\data\crabs\crabs.mat'
found by searching load path
PASSED
warning: pmtk3 has not yet been made fully octave compliant
Testing selected code............



 Iteration   FunEvals     Step Length    Function Val        Opt Cond
         1          2    6.75744e-001    6.42259e+000    3.08556e-001
error: 'lbfgsC' undefined near line 527 column 25
error: called from
    minFunc at line 527 column 23
    logregFit at line 139 column 45
    logregL2FitTest at line 20 column 8
    testPmtk3 at line 61 column 1

I saw the same error as you described.

As I wrote in second reply, this problem is the same as 

 lbfgsC cannot be found #79 
 https://github.com/probml/pmtk3/issues/79


But the above is mere work around
Correct way is to build lbfgsC.mex from lbfgsC.c in 
C:\pmtk3\pmtksupportCopy\markSchmidt-9march2011\markSchmidt\minFunc

>> cd C:\pmtk3\pmtksupportCopy\markSchmidt-9march2011\markSchmidt\minFunc
>> mex lbfgsC.c

Confirm lbfgsC.mex is generated in 
C:\pmtk3\pmtksupportCopy\markSchmidt-9march2011\markSchmidt\minFunc.




And execute testPmtk3 again
>> cd C:\pmtk3

>> testPmtk3
Checking initialization..........PASSED
Checking pmtkSupport packages....PASSED
Checking pmtkData................warning: load: 'C:\pmtk3\data\crabs\crabs.mat' 
found by
searching load path
PASSED
warning: pmtk3 has not yet been made fully octave compliant
Testing selected code............



 Iteration   FunEvals     Step Length    Function Val        Opt Cond
         1          2    6.75744e-001    6.42259e+000    3.08556e-001
         2          3    1.00000e+000    6.31963e+000    1.27336e-001
         3          5    4.50069e-001    6.31343e+000    3.40558e-002
         4          6    1.00000e+000    6.31267e+000    1.22561e-002
         5          7    1.00000e+000    6.31257e+000    6.20464e-004
         6          8    1.00000e+000    6.31257e+000    1.07863e-005
Directional Derivative below progTol
low =  23.571
high =  28.854
warning: implicit conversion from numeric to char
warning: called from
    randraw>validateParam at line 4120 column 21
    randraw at line 3541 column 26
    newcombDemo at line 33 column 5
    testPmtk3 at line 62 column 1
warning: implicit conversion from numeric to char
warning: called from
    randraw>validateParam at line 4120 column 21
    randraw at line 1177 column 21
    randraw at line 3548 column 32
    newcombDemo at line 33 column 5
    testPmtk3 at line 62 column 1
warning: implicit conversion from numeric to char
warning: called from
    randraw>validateParam at line 4120 column 21
    randraw at line 1672 column 26
    randraw at line 1180 column 30
    randraw at line 3548 column 32
    newcombDemo at line 33 column 5
    testPmtk3 at line 62 column 1
trueModel LL: -172.456
emModel LL: -156.393
warning: function name 'normalize' does not agree with function filename 
'C:\pmtk3\matlab
Tools\stats\normalise.m'
warning: called from
    viterbi_path at line 54 column 19
    hmmMap at line 22 column 6
    hmmDiscreteTest at line 38 column 24
    testPmtk3 at line 68 column 2
trueModelViterbiError =  0.57000
trueModelMaxMargError =  0.52000
emModelViterbiError =  0.55000
emModelMaxMargError =  0.55000
warning: load: 'C:\pmtk3\data\knnClassify3c\knnClassify3c.mat' found by 
searching load pa
th
error: errorbar: data argument 5 must be numeric
error: called from
    __errplot__ at line 40 column 7
    errorbar at line 181 column 10
    knnClassifyDemo at line 141 column 1
    testPmtk3 at line 69 column 1

************************************************************************************

Error 
error: 'lbfgsC' undefined near line 527 column 25


was disappeared but another error is appeared.

errorbar error occur in C:\pmtk3\demos\knnClassifyDemo.m

This seems to come from incompatibility of errorbar function between octave and 
matlab.

*********************
Change code in C:\pmtk3\demos\knnClassifyDemo.m
from
errorbar(ndx, mu, se, 'ko-','linewidth', 2, 'MarkerSize', 12);

to 

errh=errorbar(ndx, mu, se, 'ko-');
set(errh,'linewidth', 2, 'MarkerSize', 12);

testPmtk3 runs successfully. 



As in the warning, pmtk3 has not yet been made fully octave compliant so that 
limitation or workaround is required.

Tatsuro



reply via email to

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