Git Product home page Git Product logo

Comments (6)

larskotthoff avatar larskotthoff commented on June 14, 2024

How exactly are you using Auto-WEKA? What makes you think it's an issue with instantiating the classifiers?

from autoweka.

dolevr avatar dolevr commented on June 14, 2024

My mistake I confused it with an earlier problem I had. The issue arises when I try to perform training.

I had some wraper code (Java) for weka classifiers which I used for training/testing classifiers. Next I took the autoweka code and replaced the classifier instantiation with: clf = (Classifier) new AutoWEKAClassifier(); . When training, it causes the exception and stack trace above.

from autoweka.

larskotthoff avatar larskotthoff commented on June 14, 2024

Could you post a complete example that allows to reproduce the problem please?

from autoweka.

dolevr avatar dolevr commented on June 14, 2024

Sure:
Java:

public class MyWekaClassifier {
	private Classifier clf;
	public MyWekaClassifier(Config anomalyTagsConfig) throws Error {
		if (anomalyTagsConfig.useAutoWeka) {
			clf = (Classifier) new AutoWEKAClassifier();
		} else {
			initWekaClassifier(anomalyTagsConfig);
		}
		this.anomalyTagsConfig = anomalyTagsConfig;
	};

	public void classifierTrain(double[] inY, double[] inX, int numSamples, int numFeatures) throws Exception {
		Instances trainingData = data2Instances(inY, inX, numSamples, numFeatures);
		clf.buildClassifier(trainingData);
	}
}

The java class compiles to jar and stored in matlab working directory

Matlab code (which calls java):

javaaddpath('.\myJar.jar')
configOBJ = javaObject('com.myproject.Config');
configOBJ.useAutoWeka = config.useAutoWeka;

classifier = javaObject('com.myproject.MyWekaClassifier', configOBJ);
classifier.classifierTrain(yArray, reshape(trainData, [], 1), size(trainData, 2), size(trainData, 1));

I should also mention that I put all the config file in the same directory.

from autoweka.

larskotthoff avatar larskotthoff commented on June 14, 2024

I can't reproduce the problem. Here's a minimal class that does what you're doing. Running this code works fine for me:

import weka.classifiers.meta.AutoWEKAClassifier;
import weka.classifiers.Classifier;

public class Test {
    private Classifier clf;
	public Test() throws Error {
        clf = (Classifier) new AutoWEKAClassifier();
	};

    public static void main(String[] args) {
        Test test = new Test();
    }
}

from autoweka.

larskotthoff avatar larskotthoff commented on June 14, 2024

Closing as I can't reproduce the problem. Please reopen if you have a specific example that allows me to do so.

from autoweka.

Related Issues (20)

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.