Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6066001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:27:14+00:00 2026-05-23T09:27:14+00:00

We are using Java-ML(LibSVM) in order to execute the SVM algorithm over a multi-class

  • 0

We are using Java-ML(LibSVM) in order to execute the SVM algorithm over a multi-class problem

        Classifier clas = new LibSVM();
        clas.buildClassifier(data);
        Dataset dataForClassification= FileHandler.loadDataset(new File(.), 0, ",");
        /* Counters for correct and wrong predictions. */
        int correct = 0, wrong = 0;
        /* Classify all instances and check with the correct class values */
        for (Instance inst : dataForClassification) {
            Object predictedClassValue = clas.classify(inst);
            Map<Object,Double> map = clas.classDistribution(inst);
            Object realClassValue = inst.classValue();
            if (predictedClassValue.equals(realClassValue))
                correct++;
            else
                wrong++;
        }

the classDistributtion() returns a standard vector ( meaning all values are 0 but one value which equals to 1)

java-ml – http://java-ml.sourceforge.net/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:27:15+00:00Added an answer on May 23, 2026 at 9:27 am

    Despite the other answers, it is possible to output probability estimates for SVMs and LibSVM does do this. However, I’m fairly sure you can’t use this feature from Java-ML. The file LibSVM.java only ever refers to the function svm_predict_values and never svm_predict_probabilities. It probably wouldn’t be too hard to add this functionality in to Java-ML if you felt you really needed it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Java 1.4.2 with unlimited jurisdiction policy files installed. I have a class that
Using Java over Windows Vista, I'm trying to create a kind of a monitor
I'm using Java Scripting API to execute some external Python scripts from my Java
I'm using java.awt.FileDialog to create a dialog for saving a file. The problem is
I'm using Java Studio Creator with a MySQL dataBase to build my new small
Using Java, I have a class which retrieves a webpage as a byte array.
Using Java which is the best way to merge two arrays of class based
Using Java, how can I test that a URL is contactable, and returns a
Using java, minus the exception handling, it is as simple as FileOutputStream ostream =
Using java I am trying to develop a method using recursion to analyze a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.