Code Monkey home page Code Monkey logo

Comments (6)

GjjvdBurg avatar GjjvdBurg commented on August 30, 2024

Thanks for checking out GenSVM!

The parameters have the following meaning:

  1. lambda is the cost parameter of the regularization term. It helps to prevent overfitting.
  2. kappa is a parameter that determines how "quadratic" the errors in the hinge function: kappa = -0.999 approaches the absolute hinge used in classic SVMs and a larger value of kappa makes the hinge more and more quadratic. You can tune this value, but with such a large dataset maybe it's best to keep the default.
  3. epsilon is the stopping criterion for the optimization algorithm. Basically, the smaller epsilon is, the more accurately the SVM will be fitted. You may want to try using a larger value for epsilon than the default, due to the size of your dataset.

There's no simple way to know which parameter values are "best" for your dataset. But considering the size, I suggest to start with values that give you results quickly. You can save the model using the -m command line switch. Later you can then use this model as a starting position using the -s switch. This allows you to start the model training from a better position than a random start.

I hope this helps!

from gensvm.

jackweiwang avatar jackweiwang commented on August 30, 2024

Thank you very much for your answer, I see.

from gensvm.

GjjvdBurg avatar GjjvdBurg commented on August 30, 2024

@jackweiwang one more thing: it may also be beneficial for speed if you scale your data to [-1, 1] using for instance a maxabs_scale. This scaling doesn't destroy sparsity and it sometimes allows GenSVM to converge faster. Also, for SVMs it is common to scale the data such that all features have the same range because this ensures that the regularization term has the same effect on all features.

from gensvm.

jackweiwang avatar jackweiwang commented on August 30, 2024

ok, My dataset has been normalized ([0, 1]), Under training......

from gensvm.

jackweiwang avatar jackweiwang commented on August 30, 2024

I'm sorry to bother you again
The classification is excellent, but I predict it slowly, so I want change 'double' to 'float' ,Is there another problem?
image

from gensvm.

GjjvdBurg avatar GjjvdBurg commented on August 30, 2024

@jackweiwang no worries! I'm glad to hear that the classification is good. Changing double to float may help, but depending on your processor type it may be just as fast as using double (link). I would recommend measuring the computation time to see if it actually makes a difference.

Let me know if I can help further!

from gensvm.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.