-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
argument list for class template "shark::RFClassifier" is missing #264
Comments
Have you followed the tutorials? http://www.shark-ml.org/sphinx_pages/build/html/rest_sources/tutorials/algorithms/rf.html There is also a random forest example: |
I am not seeing your code, so i can only guess. Please note that examples, especially the ones i linkred, required you to define the template arguments:
RFClassifier<unsigned int> model;
RFTrainer<unsigned int> trainer;
|
@Ulfgard |
yeah, try it in release mode and allow your compiler to optimize the code.
…________________________________
From: cydcydcyd [notifications@github.com]
Sent: Monday, February 25, 2019 1:55 AM
To: Shark-ML/Shark
Cc: Oswin Krause; Mention
Subject: Re: [Shark-ML/Shark] argument list for class template "shark::RFClassifier" is missing (#264)
@Ulfgard<https://github.com/Ulfgard>
Thank you. I read examples to solve the problem.
Another problem is that RFTrainer is still slow in debug mode.
Did you speed up?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#264 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOWTBkB1G9G4nG9yG_y6nFKQeqKAMYjLks5vQzSBgaJpZM4bIzmc>.
|
hello,I try to use RFTrainer as regression, but the result is different from sklearn. |
It is different implementations, therefore the result can be different. Also the whole algorithm is stochastic, meaning every run will lead to different results.
How different is it? Are you sure, all parameters are the same?
…________________________________
From: cydcydcyd [notifications@github.com]
Sent: Tuesday, February 26, 2019 9:14 AM
To: Shark-ML/Shark
Cc: Oswin Krause; Mention
Subject: Re: [Shark-ML/Shark] argument list for class template "shark::RFClassifier" is missing (#264)
hello,I try to use RFTrainer as regression, but the result is different from sklearn.
here is some of my codes:
data.shuffle(); data.makeIndependent(); RFTrainer<RealVector> trainer(false,false); trainer.setMaxDepth(10); trainer.setMinSplit(20); RFClassifier<RealVector> model; trainer.train(model, data); Data<RealVector> testInputs = createTestInputs(fMat); Data<RealVector> pred = model(testInputs);
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#264 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOWTBq0mSlRjOBwSZzSmvixpQL-3ZgFVks5vROzlgaJpZM4bIzmc>.
|
The results are quite different and I'm not sure if I missed the key steps. |
so what are the results? just for comparison. You don't have to use wieghts, you can just use the labeleddata
…________________________________
From: cydcydcyd [notifications@github.com]
Sent: Tuesday, February 26, 2019 9:38 AM
To: Shark-ML/Shark
Cc: Oswin Krause; Mention
Subject: Re: [Shark-ML/Shark] argument list for class template "shark::RFClassifier" is missing (#264)
The results are quite different and I'm not sure if I missed the key steps.
I need to use OpenCV to calculate the feature of the images and the features in cv::Mat will be converted into shark::RealVector.
LabeledData<RealVector, RealVector> labeleddata = createLabeledDataFromRange(inputs, outputs);
WeightedLabeledData<RealVector, RealVector> data(labeleddata, 1.0f);
I set the all weights of features to 1.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#264 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOWTBiqBqa6F4yR2myAJngGToxd_GV0Oks5vRPKhgaJpZM4bIzmc>.
|
Hi, I download shark4.0 from https://github.com/Shark-ML/Shark/tree/4.0
I compile the library and try to use RFTrainer, and I get some errors like:
Severity Code Description Project File Line Suppression State
Error (active) argument list for class template "shark::RFClassifier" is missing forestCounting c:\Users\chenyuduo\Desktop\forestCounting\forestCounting\forestCounting\main.cpp 64
Severity Code Description Project File Line Suppression State
Error (active) argument list for class template "shark::RFTrainer" is missing forestCounting c:\Users\chenyuduo\Desktop\forestCounting\forestCounting\forestCounting\main.cpp 65
Can you help me solve it?thanks
The text was updated successfully, but these errors were encountered: