fixed issue for user module

This commit is contained in:
2022-10-23 05:47:53 +08:00
parent d5382c36e9
commit 5549706443
10 changed files with 92 additions and 59 deletions
+20 -20
View File
@@ -1,21 +1,21 @@
LOAD MODULE FROM "./libirf.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
);
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();
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
);
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();
+16 -20
View File
@@ -1,26 +1,22 @@
LOAD MODULE FROM "./libirf.so"
FUNCTIONS (
newtree(height:int, f:int64, sparse:vecint64, forget:double, maxf:int64, noclasses:int64, e:int, r:int64, rb:int64) -> bool,
fit(X:vecvecdouble, y:vecint64) -> bool,
predict(X:vecvecdouble) -> vecint64
);
FUNCTIONS (
newtree(height:int, f:int64, sparse:vecint, forget:double, maxf:int64, noclasses:int64, e:int, r:int64, rb:int64) -> bool,
fit(X:vecvecdouble, y:vecint64) -> bool,
predict(X:vecvecdouble) -> vecint
);
create table source(x1 double, x2 double, x3 double, x4 double, x5 int64);
load data infile "data/benchmark" into table source fields terminated by ",";
create table source(x1 double, x2 double, x3 double, x4 double, x5 int64);
load data infile "data/benchmark" into table source fields terminated by ",";
create table sparse(x int64);
insert into sparse values (1);
insert into sparse values (1);
insert into sparse values (1);
insert into sparse values (1);
create table sparse(x int);
insert into sparse values (1);
insert into sparse values (1);
insert into sparse values (1);
insert into sparse values (1);
select * from source;
select newtree(6, 4, sparse.x, 0, 4, 2, 0, 400, 2147483647) from sparse
select newtree(6, 4, sparse.x, 0, 4, 2, 0, 400, 2147483647) from sparse;
select fit(pack(x1, x2, x3, x4), x5) from source
select fit(pack(x1, x2, x3, x4), x5) from source limit 100;
select fit(pack(x1, x2, x3, x4), x5) from source limit 100;
select fit(pack(x1, x2, x3, x4), x5) from source limit 100;
select fit(pack(x1, x2, x3, x4), x5) from source limit 100;
select predict(pack(x1, x2, x3, x4)) from source limit 100;
-- select pack(x1, x2, x3, x4) from source
select predict(pack(x1, x2, x3, x4)) from source
-2
View File
@@ -8,5 +8,3 @@ SELECT sum(c), b, d
FROM testq1
group by a,b,d
order by d DESC, b ASC;
-- aaaa