shogun-toolbox / shogun Goto Github PK
View Code? Open in Web Editor NEWShōgun
Home Page: http://shogun-toolbox.org
License: BSD 3-Clause "New" or "Revised" License
Shōgun
Home Page: http://shogun-toolbox.org
License: BSD 3-Clause "New" or "Revised" License
Hey. It would be great if you could update the comparison table on your website.
I'm a scikit-learn developer and thing we added recently contain;
any many more...
Thanks :)
Various interfaces require newer versions of swig and it has the benefit to use -builtin -modern -modernargs for python - which makes the .*py wrappers obsolete (only modshogun.so) around.
The multiclass cross-validation shogun example works well only with MulticlassLiblinear machine.
I am not able to find out what the problem is. It seems that the pb is comin from LaRank. Need help on this.
Hi,
I run into problems while trying to compile shogun from source and include support for the octave_static interface with the most recent Octave 3.6.1.
The test in the configure script didn't work properly. I've used the following instead (from line 4156):
[...]
if octave --no-history -v >/dev/null 2>&1
then
_octave_version="octave --no-history -v | grep version | cut -f 4- -d ' '
"
if test "echo $_octave_version | cut -f 1 -d '.'
" -ge 3
[...]
Hi,
I've just tried to install the r_static interface of shogun 1.1.0 on R2.15.0.
Everything is going well until I try to call "library('sg')" in R.
> library('sg')
Error in library("sg") : ‘sg’ is not a valid installed package
It seems that the installation fails to create the sg/Meta/package.rds. I used the package.rds generated by an other installation (R2.14.1) and it fixes the problem.
Cheers,
Jérôme
Once available, it should be used in QDA.cpp:52
Hi, guys,
I have the problem of installing shogun on my Macpro with Lion system. I tried to download from github and compiled it, failed. Then i tried to follow the install instruction to use macport to install it, failed. Here is the information, hope you can improve it a little bit.
$sudo port install sudo port install swig -php5 -ruby -perl +python
success!
$sudo port install shogun
---> Computing dependencies for shogun
---> Dependencies to be installed: atlas gcc45 gmp ld64 libmpc mpfr ppl glpk gzip gsed hdf5-18 py26-numpy fftw-3 py26-nose nosetests_select py26-distribute python26 readline swig-python
---> Installing gmp @5.0.4_0
Error: org.macports.install for port gmp returned: no destroot found at: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gmp/gmp/work/destroot
Error: Failed to install gmp
Please see the log file for port gmp for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gmp/gmp/main.log
Error: The following dependencies were not installed: atlas gcc45 gmp ld64 libmpc mpfr ppl glpk gzip gsed hdf5-18 py26-numpy fftw-3 py26-nose nosetests_select py26-distribute python26 readline swig-python
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port shogun failed
"ShareBoost: Efficient Multiclass Learning with
Feature Sharing" by Shalev-Shwartz et al
Migrations enable a way of persistence to be able to load shogun objects serialized with some old version of shogun in newer versions of shogun.
To this end the system has to load the data corresponding to the old object and translate the data (e.g. type change, name change, parameter got dropped). Ultimately an object is de-serialized with that new data.
In the modular Python interface, I would expect I can do .set_subset() on a RealFeatures instance (which is a CSimpleFeatures<float64_t>). However, it seems this function is not exposed in the modular interface (yet)?
It probably requires just an update to the typemap, but I'm no SWIG expert.
I'm using a GIT tarball of this week (shogun-toolbox-shogun-2d37d40).
It would be even more convienient if .set_subset() also worked on CCombindDotFeatures, but it looks like that would require a significant effort.
Would it be possible to update the Macports Portfile to SHOGUN 2.0 and recent python versions?
There is a ticket with the same request in Macports Trac [1], but I thought mentioning it here also. :-)
Note that the Shogun web page [2] mentions Macports for installing Shogun on Mac, but it's not clear if that is still maintained.
Thanks for working an Shogun and congrats on the 2.0 release!
[1] https://trac.macports.org/ticket/33205
[2] http://www.shogun-toolbox.org/doc/en/current/installation.html
Technology?
In the current git master, the CSubset class is not exposed in the modular interfaces (making calls to add_subset impossible).
Adding two lines to src/interfaces/modular/Features.i
%rename(Subset) CSubset;
%include <shogun/features/Subset.h>
And one to src/interfaces/modular/Features_includes.i:
#include <shogun/features/Subset.h>
Will expose the class. However, I don't know how to properly map the constructor CSubset(SGVector<index_t> subset_idx) in SWIG so I can use it from Python.
Hi,
using MKL and SVMLight, there are two different kinds of memory errors. (Context: Modelselection)
1.) Using interleaved optimization in MKL, there is a NULL-pointer error because SVMLight tries to read its W array which is NULL
2.) Using non-interleaved optimization in MKL, there is an illegal write into the alpha array. The lines
float64_t* alpha = SG_MALLOC(float64_t, totdoc);
for (i=0; i<totdoc; i++)
alpha[i]=0;
for (i=0; i<get_num_support_vectors(); i++)
alpha[get_support_vector(i)]=get_alpha(i);
are responsible: totdoc which is the number of int labels, is sometimes a different number than get_num_support_vectors(), in the case of the write error: smaller, so the index grows over the array bounds.
I'll try to put the code that reproduces this somewhere....
FK, TOP, LocalAlignment, Oligo
we need a buildbot running on osx for CI
Integrate in the model selection framework the K parameter (number of
neighbors) of KNN. So far, it is recommended to use an specific method
(classify_multiple_k) to choose the best k within a range of values.
For a shot discussion on the topic, please read te comments in
GSoC2012's task: mloss.org and mldata.org has one subtask:
Make shogun natively be able to read and write support for the hdf5 based data sets and tasks.
I have cloned the source code, and found that the HDF5File support has been merged into master branch.
what's wrong with this file? how I deal with it? Please help me, thanks.
I'm getting linking errors when compiling shogun 1.0.0:
(...)
./io/HDF5File.cpp.o: In function `MPI::Comm::Allreduce(void const*, void*, int, MPI::Datatype const&, MPI::Op const&) const':
/usr/include/openmpi/ompi/mpi/cxx/comm_inln.h:452: undefined reference to `MPI_Allreduce'
./io/HDF5File.cpp.o: In function `MPI::Comm::Reduce(void const*, void*, int, MPI::Datatype const&, MPI::Op const&, int) const':
/usr/include/openmpi/ompi/mpi/cxx/comm_inln.h:445: undefined reference to `MPI_Reduce'
./io/HDF5File.cpp.o: In function `MPI::Comm::Alltoallw(void const*, int const*, int const*, MPI::Datatype const*, void*, int const*, int const*, MPI::Datatype const*) const':
/usr/include/openmpi/ompi/mpi/cxx/comm_inln.h:435: undefined reference to `MPI_Alltoallw'
./io/HDF5File.cpp.o: In function `MPI::Comm::Alltoallv(void const*, int const*, int const*, MPI::Datatype const&, void*, int const*, int const*, MPI::Datatype const&) const':
/usr/include/openmpi/ompi/mpi/cxx/comm_inln.h:409: undefined reference to `MPI_Alltoallv'
./io/HDF5File.cpp.o: In function `MPI::Comm::Alltoall(void const*, int, MPI::Datatype const&, void*, int, MPI::Datatype const&) const':
/usr/include/openmpi/ompi/mpi/cxx/comm_inln.h:394: undefined reference to `MPI_Alltoall'
./io/HDF5File.cpp.o: In function `MPI::Comm::Allgatherv(void const*, int, MPI::Datatype const&, void*, int const*, int const*, MPI::Datatype const&) const':
(...)
The failing command is:
c++ ./regression/KRR.cpp.o ./regression/svr/MKLRegression.cpp.o ./regression/svr/SVRLight.cpp.o ./regression/svr/LibSVR.cpp.o ./ui/GUIDistance.cpp.o ./ui/GUIPreprocessor.cpp.o ./ui/GUITime.cpp.o ./ui/GUIClassifier.cpp.o ./ui/GUILabels.cpp.o ./ui/SGInterface.cpp.o ./ui/GUIMath.cpp.o ./ui/GUIKernel.cpp.o ./ui/GUIStructure.cpp.o ./ui/GUIPluginEstimate.cpp.o ./ui/GUIHMM.cpp.o ./ui/GUIFeatures.cpp.o ./io/SerializableFile.cpp.o ./io/BinaryFile.cpp.o ./io/StreamingVwCacheFile.cpp.o ./io/SerializableJsonReader00.cpp.o ./io/HDF5File.cpp.o ./io/SerializableAsciiFile.cpp.o ./io/SerializableHdf5Reader00.cpp.o ./io/StreamingAsciiFile.cpp.o ./io/StreamingFileFromFeatures.cpp.o ./io/SGIO.cpp.o ./io/File.cpp.o ./io/SerializableXmlReader00.cpp.o ./io/SerializableJsonFile.cpp.o ./io/SerializableHdf5File.cpp.o ./io/StreamingFile.cpp.o ./io/AsciiFile.cpp.o ./io/SerializableXmlFile.cpp.o ./io/StreamingVwFile.cpp.o ./io/SerializableAsciiReader00.cpp.o ./io/IOBuffer.cpp.o ./loss/HingeLoss.cpp.o ./loss/SquaredLoss.cpp.o ./loss/LogLoss.cpp.o ./loss/SquaredHingeLoss.cpp.o ./loss/LogLossMargin.cpp.o ./loss/SmoothHingeLoss.cpp.o ./preprocessor/PCA.cpp.o ./preprocessor/LocalTangentSpaceAlignment.cpp.o ./preprocessor/KernelPCA.cpp.o ./preprocessor/Preprocessor.cpp.o ./preprocessor/MultidimensionalScaling.cpp.o ./preprocessor/LaplacianEigenmaps.cpp.o ./preprocessor/SortWordString.cpp.o ./preprocessor/RandomFourierGaussPreproc.cpp.o ./preprocessor/PruneVarSubMean.cpp.o ./preprocessor/KernelLocallyLinearEmbedding.cpp.o ./preprocessor/Isomap.cpp.o ./preprocessor/HessianLocallyLinearEmbedding.cpp.o ./preprocessor/LogPlusOne.cpp.o ./preprocessor/SortUlongString.cpp.o ./preprocessor/LocallyLinearEmbedding.cpp.o ./preprocessor/NormOne.cpp.o ./modelselection/ParameterCombination.cpp.o ./modelselection/ModelSelection.cpp.o ./modelselection/ModelSelectionParameters.cpp.o ./modelselection/GridSearchModelSelection.cpp.o ./machine/DistanceMachine.cpp.o ./machine/OnlineLinearMachine.cpp.o ./machine/LinearMachine.cpp.o ./machine/KernelMachine.cpp.o ./machine/Machine.cpp.o ./classifier/vw/vw_example.cpp.o ./classifier/vw/vw_label.cpp.o ./classifier/vw/VowpalWabbit.cpp.o ./classifier/vw/vw_math.cpp.o ./classifier/vw/learners/VwNonAdaptiveLearner.cpp.o ./classifier/vw/learners/VwAdaptiveLearner.cpp.o ./classifier/vw/VwEnvironment.cpp.o ./classifier/vw/VwParser.cpp.o ./classifier/vw/VwRegressor.cpp.o ./classifier/vw/cache/VwNativeCacheWriter.cpp.o ./classifier/vw/cache/VwCacheWriter.cpp.o ./classifier/vw/cache/VwCacheReader.cpp.o ./classifier/vw/cache/VwNativeCacheReader.cpp.o ./classifier/AveragedPerceptron.cpp.o ./classifier/mkl/MKLOneClass.cpp.o ./classifier/mkl/MKLMultiClassOptimizationBase.cpp.o ./classifier/mkl/MKLMultiClassGradient.cpp.o ./classifier/mkl/MKLMultiClass.cpp.o ./classifier/mkl/MKLMultiClassGLPK.cpp.o ./classifier/mkl/MKLClassification.cpp.o ./classifier/mkl/MKL.cpp.o ./classifier/svm/gpdt.cpp.o ./classifier/svm/DomainAdaptationSVM.cpp.o ./classifier/svm/OnlineLibLinear.cpp.o ./classifier/svm/ScatterSVM.cpp.o ./classifier/svm/SVM.cpp.o ./classifier/svm/libqp_splx.cpp.o ./classifier/svm/LibLinear.cpp.o ./classifier/svm/SubGradientSVM.cpp.o ./classifier/svm/GMNPLib.cpp.o ./classifier/svm/gpdtsolve.cpp.o ./classifier/svm/SVMOcas.cpp.o ./classifier/svm/LibSVMOneClass.cpp.o ./classifier/svm/LaRank.cpp.o ./classifier/svm/MPDSVM.cpp.o ./classifier/svm/GNPPSVM.cpp.o ./classifier/svm/pr_loqo.cpp.o ./classifier/svm/MultiClassSVM.cpp.o ./classifier/svm/ssl.cpp.o ./classifier/svm/QPBSVMLib.cpp.o ./classifier/svm/Tron.cpp.o ./classifier/svm/GPBTSVM.cpp.o ./classifier/svm/SVMLightOneClass.cpp.o ./classifier/svm/OnlineSVMSGD.cpp.o ./classifier/svm/SVM_linear.cpp.o ./classifier/svm/GMNPSVM.cpp.o ./classifier/svm/SGDQN.cpp.o ./classifier/svm/SVMSGD.cpp.o ./classifier/svm/LibSVMMultiClass.cpp.o ./classifier/svm/CPLEXSVM.cpp.o ./classifier/svm/GNPPLib.cpp.o ./classifier/svm/DomainAdaptationSVMLinear.cpp.o ./classifier/svm/gpm.cpp.o ./classifier/svm/WDSVMOcas.cpp.o ./classifier/svm/SVM_libsvm.cpp.o ./classifier/svm/LibSVM.cpp.o ./classifier/svm/libocas.cpp.o ./classifier/svm/SVMLight.cpp.o ./classifier/svm/SVMLin.cpp.o ./classifier/LPM.cpp.o ./classifier/PluginEstimate.cpp.o ./classifier/KNN.cpp.o ./classifier/SubGradientLPM.cpp.o ./classifier/GaussianNaiveBayes.cpp.o ./classifier/Perceptron.cpp.o ./classifier/LDA.cpp.o ./classifier/LPBoost.cpp.o ./base/ParameterMap.cpp.o ./base/class_list.cpp.o ./base/Version.cpp.o ./base/Parallel.cpp.o ./base/init.cpp.o ./base/SGObject.cpp.o ./base/Parameter.cpp.o ./mathematics/Math.cpp.o ./mathematics/Statistics.cpp.o ./mathematics/Cplex.cpp.o ./mathematics/arpack.cpp.o ./mathematics/lapack.cpp.o ./distributions/Gaussian.cpp.o ./distributions/GHMM.cpp.o ./distributions/LinearHMM.cpp.o ./distributions/Histogram.cpp.o ./distributions/Distribution.cpp.o ./distributions/PositionalPWM.cpp.o ./distributions/HMM.cpp.o ./lib/Hash.cpp.o ./lib/Time.cpp.o ./lib/HashSet.cpp.o ./lib/memory.cpp.o ./lib/FibonacciHeap.cpp.o ./lib/Compressor.cpp.o ./lib/DataType.cpp.o ./lib/Signal.cpp.o ./lib/Trie.cpp.o ./lib/ShogunException.cpp.o ./distance/CanberraWordDistance.cpp.o ./distance/EuclidianDistance.cpp.o ./distance/ManhattanWordDistance.cpp.o ./distance/ManhattanMetric.cpp.o ./distance/SparseEuclidianDistance.cpp.o ./distance/Distance.cpp.o ./distance/AttenuatedEuclidianDistance.cpp.o ./distance/KernelDistance.cpp.o ./distance/MinkowskiMetric.cpp.o ./distance/CanberraMetric.cpp.o ./distance/CustomDistance.cpp.o ./distance/TanimotoDistance.cpp.o ./distance/BrayCurtisDistance.cpp.o ./distance/JensenMetric.cpp.o ./distance/CosineDistance.cpp.o ./distance/ChebyshewMetric.cpp.o ./distance/HammingWordDistance.cpp.o ./distance/ChiSquareDistance.cpp.o ./distance/GeodesicMetric.cpp.o ./evaluation/StratifiedCrossValidationSplitting.cpp.o ./evaluation/MeanSquaredError.cpp.o ./evaluation/CrossValidation.cpp.o ./evaluation/ROCEvaluation.cpp.o ./evaluation/PRCEvaluation.cpp.o ./evaluation/SplittingStrategy.cpp.o ./evaluation/MulticlassAccuracy.cpp.o ./evaluation/ContingencyTableEvaluation.cpp.o ./structure/Plif.cpp.o ./structure/PlifArray.cpp.o ./structure/IntronList.cpp.o ./structure/SegmentLoss.cpp.o ./structure/PlifMatrix.cpp.o ./structure/DynProg.cpp.o ./clustering/GMM.cpp.o ./clustering/Hierarchical.cpp.o ./clustering/KMeans.cpp.o ./features/WDFeatures.cpp.o ./features/SNPFeatures.cpp.o ./features/ImplicitWeightedSpecFeatures.cpp.o ./features/Features.cpp.o ./features/CombinedFeatures.cpp.o ./features/StreamingVwFeatures.cpp.o ./features/FKFeatures.cpp.o ./features/Labels.cpp.o ./features/TOPFeatures.cpp.o ./features/DotFeatures.cpp.o ./features/ExplicitSpecFeatures.cpp.o ./features/Subset.cpp.o ./features/HashedWDFeaturesTransposed.cpp.o ./features/SparsePolyFeatures.cpp.o ./features/AttributeFeatures.cpp.o ./features/LBPPyrDotFeatures.cpp.o ./features/CombinedDotFeatures.cpp.o ./features/RealFileFeatures.cpp.o ./features/PolyFeatures.cpp.o ./features/HashedWDFeatures.cpp.o ./features/Alphabet.cpp.o ./kernel/WeightedDegreeStringKernel.cpp.o ./kernel/GaussianShortRealKernel.cpp.o ./kernel/PyramidChi2.cpp.o ./kernel/LocalityImprovedStringKernel.cpp.o ./kernel/Kernel.cpp.o ./kernel/TensorProductPairKernel.cpp.o ./kernel/TStudentKernel.cpp.o ./kernel/WeightedDegreeRBFKernel.cpp.o ./kernel/SigmoidKernel.cpp.o ./kernel/PolyMatchWordStringKernel.cpp.o ./kernel/Chi2Kernel.cpp.o ./kernel/SplineKernel.cpp.o ./kernel/HistogramWordStringKernel.cpp.o ./kernel/CombinedKernel.cpp.o ./kernel/LinearKernel.cpp.o ./kernel/RegulatoryModulesStringKernel.cpp.o ./kernel/SNPStringKernel.cpp.o ./kernel/SpectrumRBFKernel.cpp.o ./kernel/ExponentialKernel.cpp.o ./kernel/DistanceKernel.cpp.o ./kernel/OligoStringKernel.cpp.o ./kernel/GaussianShiftKernel.cpp.o ./kernel/WeightedCommWordStringKernel.cpp.o ./kernel/SpectrumMismatchRBFKernel.cpp.o ./kernel/LinearStringKernel.cpp.o ./kernel/DistantSegmentsKernel.cpp.o ./kernel/BesselKernel.cpp.o ./kernel/PolyMatchStringKernel.cpp.o ./kernel/SimpleLocalityImprovedStringKernel.cpp.o ./kernel/InverseMultiQuadricKernel.cpp.o ./kernel/CircularKernel.cpp.o ./kernel/WaveKernel.cpp.o ./kernel/MatchWordStringKernel.cpp.o ./kernel/PowerKernel.cpp.o ./kernel/PolyKernel.cpp.o ./kernel/MultiquadricKernel.cpp.o ./kernel/SphericalKernel.cpp.o ./kernel/LogKernel.cpp.o ./kernel/WeightedDegreePositionStringKernel.cpp.o ./kernel/CommWordStringKernel.cpp.o ./kernel/WaveletKernel.cpp.o ./kernel/HistogramIntersectionKernel.cpp.o ./kernel/SparseSpatialSampleStringKernel.cpp.o ./kernel/DiagKernel.cpp.o ./kernel/SalzbergWordStringKernel.cpp.o ./kernel/CustomKernel.cpp.o ./kernel/CauchyKernel.cpp.o ./kernel/GaussianMatchStringKernel.cpp.o ./kernel/ConstKernel.cpp.o ./kernel/CommUlongStringKernel.cpp.o ./kernel/AUCKernel.cpp.o ./kernel/LocalAlignmentStringKernel.cpp.o ./kernel/FixedDegreeStringKernel.cpp.o ./kernel/RationalQuadraticKernel.cpp.o ./kernel/GaussianKernel.cpp.o ./kernel/ANOVAKernel.cpp.o -Xlinker --no-undefined -o libshogun.so.10.0 -lm -pthread -lhdf5 -lxml2 -llapack -lcblas -latlas -llapack -lcblas -llzo2 -lz -lbz2 -llzma -fPIC -Xlinker -soname=libshogun.so.10 -shared -Wl,-export-dynamic
Adding --ldfags="-lmpi -lmpi_cxx"
to ./configure
fixes the issue. Am I missing something?
probably add another flag print_function_name and then use it in message PRETTY_FUNCTION
By the moment some LAPACK routines for eigenproblems is used. Notably that most of assigned eigenproblems in Shogun are symmetrical and doesn't require all eigenvalues(vectors), but just a few. The possible solution to speed up some algorithms is to use some variation of Lanzcos method (IRLM) appeared in ARPACK.
This issue is mainly concerned with preprocessor part of Shogun.
we need a buildbot running on win7 / cygwin for CI
"Fast and Balanced: Efficient Label Tree Learning for
Large Scale Object Recognition" by Deng et al
Currently i'm using shogun via java_modular an for some reason i'm having some troubles with the HistogramIntersection kernel.
Depending on which constructor i'm using, the training time is significantly different. meaning in case a) the training time is about 30 seconds, while in case b) it's around 2 minutes. but of course if required i can time it properly...
double beta = 1.4;
int cache_size = 10;
bool slow = false;
if (slow) {
// case a
kernel = new HistogramIntersectionKernel (cache_size);
kernel.set_beta (beta);
kernel.init (trainFeats, trainFeats);
} else {
// case b
kernel = new HistogramIntersectionKernel (trainFeats, trainFeats, beta, cache_size);
}
...doing the training with the same machine
In some cases LINADD optimization leads to R<0 assertion failure.
The configure file detected an i386 architecture whereas my pc has a x86_64. The problem seems to revolve around a specific if-else clausule which goes in the wrong direction and sets host_arch to be i386. I solved my problem simply assigning host_arch=x86_64 in both the if and the else clausule.
[...]
1609 case "( uname -m ) 2>&1
" in
[...]
1612 x86_64|amd64)
1613 if [ -n "$COMP_C -dumpmachine 2>&1 | sed -n '/^x86_64-/p;/^amd64-/p'
" -a
1614 -z "echo $COMPFLAGS_C | grep -- -m32
" ]; then
1615 host_arch=x86_64
1616 else
1617 host_arch=x86_64 #i386
1618 fi
1619 ;;
[...]
According to
"Scalable Training of Mixture Models via Coresets" by Feldman et al
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.