You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 25, 2024. It is now read-only.
Hello,
I train the One Class SVC in Python and port it to C++ as follows:
import micromlgen
from micromlgen import port
classmap = {
-1: 'Fault',
1: 'No fault'
}
c_code_OCSVM= port(one_class_svm)
modelfile= open('OCSVM.h', 'w')
modelfile.write(c_code_OCSVM)
modelfile.close()
I import the OCSVM as follows to the Arduino IDE, (Board: ESP32)
#include "OCSVM.h"
hi, i am also using micromlgen to convert my RF regression into C++ code. but the generated code gives different and wrong results as compared to the python code i had written. it is giving a single output for every input given to it which in fact is wrong.
Can someone tell me what went wrong?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I train the One Class SVC in Python and port it to C++ as follows:
import micromlgen
from micromlgen import port
classmap = {
-1: 'Fault',
1: 'No fault'
}
c_code_OCSVM= port(one_class_svm)
modelfile= open('OCSVM.h', 'w')
modelfile.write(c_code_OCSVM)
modelfile.close()
I import the OCSVM as follows to the Arduino IDE, (Board: ESP32)
#include "OCSVM.h"
Eloquent::ML::Port::OneClassSVM clf;
void setup() {
Serial.begin(115200);
delay(2000);
float data [2] ={0.45,1.0};
Serial.println(clf.predict(data));
}
The Problem is, that "clf.predict(data)" gives another outout as "prediction = one_class_svm.predict(r)" in python.
Is soemthing missing in my Code?
The text was updated successfully, but these errors were encountered: