-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_queries.sql
74 lines (67 loc) · 1.17 KB
/
setup_queries.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
create database db1;
create table tb1 (x float, y float);
-- dataset for 2+x
select * from linear_tb;
create table linear_tb(x float, y float);
insert into linear_tb(x, y)
values
(1,3),
(2,4),
(3,5),
(4,6),
(5,7),
(6,8),
(7,9),
(8,10),
(9,11),
(10,12);
-- dataset for 25/1+35e^-x
insert into tb1 (x, y)
values
(1,2.077035893),
(2,4.940654345),
(3,10.02561725),
(4,16.13455791),
(5,20.7962742),
(6,23.26961196),
(7,24.33429973),
(8,24.75090984),
(9,24.90778406),
(10,24.96599637),
(11,24.98748),
(12,24.99539269),
(13,24.99830487),
(14,24.99937637),
(15,24.99977058),
(16,24.9999156),
(17,24.99996895),
(18,24.99998858),
(19,24.9999958),
(20,24.99999845),
(21,24.99999943),
(23,24.99999992),
(22,24.99999979);
-- binary logistic regression
select * from logistic_table
create table logistic_table(x0 float, y float)
insert into logistic_table(x, y)
values
(-4.5,0.0),
(-4,0.0),
(-3.5,0.0),
(-3,0.0),
(-2.5,0.0),
(-2,0.0),
(-1.5,0.0),
(-1,0.0),
(-0.5,0.0),
(0,0.0),
(0.5,1.0),
(1,1.0),
(1.5,1.0),
(2,1.0),
(2.5,1.0),
(3,1.0),
(3.5,1.0),
(4,1.0),
(4.5,1.0);