Re: [shogun] Undefined reference linking to libshogun 5.0

2017-03-27 Thread Jose Gomez

Hello Fernando,

You can find below the code I use without database access. I compiled it 
using


 g++ -std=c++11 sample.cpp -o sample -lshogun

I get the same error as I mentioned.

Thanks for your interest.

Greetings,

Jose

#include 
#include 
#include 
#include 
#include 

using namespace shogun;

int main(int argc, char **argv)
{
int iFolders=10;
int i,k;
int iRows=100;
SGMatrix *psFeatures=new SGMatrix[iFolders];
SGVector *psLabels=new SGVector[iFolders];
CDenseFeatures *features=new 
CDenseFeatures[iFolders];

CMulticlassLabels *labels=new CMulticlassLabels[iFolders];
double **ppdFeatures= new double*[iFolders];
double **ppdLabels= new double*[iFolders];
CGaussianNaiveBayes *gnb=new CGaussianNaiveBayes[iFolders];
double dAc=0;
for (i=0; i<iFolders; i++)
{
ppdFeatures[i]=(double *)calloc(3*iRows, sizeof(double));
ppdLabels[i]=(double *)calloc(iRows, sizeof(double));
psFeatures[i]=SGMatrix(ppdFeatures[i], iRows, 3);
psLabels[i]=SGVector(ppdLabels[i], iRows);
features[i]=CDenseFeatures(psFeatures[i]);
labels[i]=CMulticlassLabels(psLabels[i]);
gnb[i] = CGaussianNaiveBayes(features+i, labels+i);
gnb[i].train();
}

CMulticlassAccuracy eval = CMulticlassAccuracy();
for (i=0, k=0; i<iFolders;i++)
{
for (int j=0; j<iFolders; j++)
{
if (i!=j)
{
auto labels_predict = gnb[j].apply_multiclass(features+i);
dAc += eval.evaluate(labels_predict, labels+i);
k++;
}
}
}

}


On 03/27/2017 10:03 AM, Fernando J. Iglesias GarcĂ­a wrote:

Hello Jose,

Could you isolate the error in a minimal example and share the code? 
Thank you!


Cheers,
Fernando.

On 27 March 2017 at 07:20, Jose Gomez <jose.gomez.lo...@gmail.com 
<mailto:jose.gomez.lo...@gmail.com>> wrote:


Hi all,

I made a test C++ program using a mysql database.
The compilation line I use:

g++ -std=c++11 database.cpp whole_dataset.cpp -o whole_dataset
-lshogun -lmysqlclient

I get

/tmp/ccCFhRAD.o: In function
`shogun::CSGObject::operator=(shogun::CSGObject const&)':

whole_dataset.cpp:(.text._ZN6shogun9CSGObjectaSERKS0_[_ZN6shogun9CSGObjectaSERKS0_]+0x27):
undefined reference to

`shogun::Unique::operator=(shogun::Unique
const&)'
collect2: error: ld returned 1 exit status

I'm using libshogun17 and libshogun-dev stable packages from the
stable ppa repository in ubuntu 14.04

Am I missing some extra dependencies?

Thanks in advance for your help.

Greetings

Jose Gomez






[shogun] Undefined reference linking to libshogun 5.0

2017-03-26 Thread Jose Gomez

Hi all,

I made a test C++ program using a mysql database.
The compilation line I use:

g++ -std=c++11 database.cpp whole_dataset.cpp -o whole_dataset -lshogun 
-lmysqlclient


I get

/tmp/ccCFhRAD.o: In function 
`shogun::CSGObject::operator=(shogun::CSGObject const&)':
whole_dataset.cpp:(.text._ZN6shogun9CSGObjectaSERKS0_[_ZN6shogun9CSGObjectaSERKS0_]+0x27): 
undefined reference to 
`shogun::Unique::operator=(shogun::Unique 
const&)'

collect2: error: ld returned 1 exit status

I'm using libshogun17 and libshogun-dev stable packages from the stable 
ppa repository in ubuntu 14.04


Am I missing some extra dependencies?

Thanks in advance for your help.

Greetings

Jose Gomez



[shogun] Octave modshogun can't find libshogun.so.16

2016-10-08 Thread Jose Gomez

Hi all,

I'm a newbie in  Shogun. After compile and install shogun 4.1.0 with 
octave-module support in Debian Linux. I run octave and type modshogun, 
I get the following error :
error: 
/usr/lib/x86_64-linux-gnu/octave/site/oct/api-v50+/x86_64-pc-linux-gnu//modshogun.oct: 
failed to load: libshogun.so.17: can't open shared object file: File or 
directory doesn't exist.

I checked libshogun.so.17 is in /usr/local/lib.

Can anybody help me in know what I did wrong?

Thanks in advance for your help.

Jose Gomez