fixed user module (dt)

This commit is contained in:
2022-10-07 14:39:17 +08:00
parent 6467bc6964
commit 988bf0158e
7 changed files with 19 additions and 31 deletions
Binary file not shown.
+2 -5
View File
@@ -1,14 +1,11 @@
LOAD MODULE FROM "./libirf.so"
FUNCTIONS (
mydiv(a:int, b:int) -> double,
mulvec(a:int, b:vecfloat) -> vecfloat,
newtree(height:int, f:int64, sparse:vecint, forget:double, maxF:int64, noClasses:int64, e:int, r:int64, rb:int64) -> bool,
newtree(height:int, f:int64, sparse:vecint, forget:double, maxf:int64, noclasses:int64, e:int, r:int64, rb:int64) -> bool,
additem(X:vecdouble, y:int64, size:int64) -> bool,
fit() -> bool,
predict() -> vecint
);
select mydiv(2,3);
create table tb(x int);
create table tb2(x double, y double, z double);
insert into tb values (0);
@@ -22,4 +19,4 @@ select additem(tb2.x, 1, 3) from tb2;
select additem(tb2.y, 0, -1) from tb2;
select additem(tb2.z, 1, -1) from tb2;
select fit();
select predict();
select predict();
+5 -19
View File
@@ -1,22 +1,8 @@
LOAD MODULE FROM "./libirf.so"
LOAD MODULE FROM "./test.so"
FUNCTIONS (
newtree(height:int, f:int64, sparse:vecint, forget:double, maxf:int64, noclasses:int64, e:int, r:int64, rb:int64) -> bool,
additem(X:vecdouble, y:int64, size:int64) -> bool,
fit() -> bool,
predict() -> vecint
mydiv(a:int, b:int) -> double,
mulvec(a:int, b:vecfloat) -> vecfloat
);
create table tb(x int);
create table tb2(x double, y double, z double);
insert into tb values (0);
insert into tb values (0);
insert into tb values (0);
select newtree(5, 3, tb.x, 0, 3, 2, 0, 100, 1) from tb;
insert into tb2 values (1, 0, 1);
insert into tb2 values (0, 1, 1);
insert into tb2 values (1, 1, 1);
select additem(tb2.x, 1, 3) from tb2;
select additem(tb2.y, 0, -1) from tb2;
select additem(tb2.z, 1, -1) from tb2;
select fit();
select predict();
select mydiv(2,3);