Spaces:
Sleeping
Sleeping
# Data Mining from scratch backend | |
Currently living [here](https://data-mining-from-scratch-backend.onrender.com/) | |
### Example Useage | |
```python | |
import requests | |
import json | |
request_params = { | |
"algorithm": "neural-network", | |
"arguments": { | |
"epochs": 20, | |
"activation_func": "tanh", | |
"hidden_size": 12, | |
"learning_rate": 0.1 | |
} | |
} | |
headers = { | |
"Content-Type": "application/json", | |
} | |
r = requests.post( | |
"https://data-mining-from-scratch-backend.onrender.com/", | |
headers=headers, | |
data=json.dumps(request_params), | |
) | |
model_data = r.json() | |
print(model_data) | |
``` | |
```json | |
{ | |
"activation_func": "tanh", | |
"b1": [ | |
[ | |
602.2458551757542, | |
-683.446253227002, | |
650.3183189757099, | |
-523.2155000337558, | |
609.3366256008726, | |
639.2267460958211, | |
695.2165647208506, | |
-606.7936305551088, | |
657.4012435144655, | |
711.4633443525767, | |
-471.4445655803913, | |
-630.9028119023186 | |
] | |
], | |
"b2": [ | |
[ | |
67.47031899621929 | |
] | |
], | |
"epochs": 20, | |
"func_prime": "tanh_prime", | |
"hidden_size": 12, | |
"learning_rate": 0.1, | |
"loss_history": [ | |
7.461892920397806, | |
3.5105095887100286, | |
3.3859446278971737, | |
3.4806412166759375, | |
3.371428625854261, | |
3.4857142857142858, | |
3.3714285714285714, | |
3.48730595787098, | |
3.485714285485333, | |
3.3714285714285714, | |
3.4857142857142858, | |
3.4857142857142858, | |
3.4857142857142858, | |
3.3714285714285714, | |
3.5428571428571427, | |
3.4857142857142858, | |
3.485714285632444, | |
3.3714285714285714, | |
3.4857142857142858, | |
3.4857142857142858 | |
], | |
"mse": 4.366666666666666, | |
"w1": [ | |
[ | |
207.21370782767613, | |
-234.36758639516955, | |
223.138392823433, | |
-181.15547589171842, | |
209.25701811587953, | |
212.01236197395147, | |
222.77599062157392, | |
-209.86998324411556, | |
223.21606629672203, | |
240.23438173347404, | |
-152.44942030486683, | |
-204.9225317835803 | |
], | |
[ | |
229.63220261470508, | |
-263.50359108398936, | |
248.70108057424608, | |
-200.62149189864414, | |
233.2719960712533, | |
244.95992976697852, | |
264.002073506371, | |
-233.06264745543191, | |
250.09188502741318, | |
272.63944378494415, | |
-182.2009679976884, | |
-240.4510248021291 | |
], | |
[ | |
138.18702051907664, | |
-156.58749787870684, | |
147.69195397715987, | |
-119.38899990797744, | |
139.13330931089936, | |
148.72414234071377, | |
160.8962313494786, | |
-138.41372650228243, | |
152.08258913831452, | |
162.33017016825823, | |
-107.55668307217107, | |
-145.40927349021786 | |
], | |
[ | |
80.41290811507756, | |
-90.13436061161102, | |
84.13085847223971, | |
-68.30212833885442, | |
79.47595245611743, | |
83.21680900863142, | |
86.27896789463828, | |
-80.74680560543842, | |
83.83413687806267, | |
90.56585130892569, | |
-57.458134412543025, | |
-80.8434826355516 | |
], | |
[ | |
81.11703964929961, | |
-92.44245617525553, | |
88.49474524464306, | |
-72.04388326457483, | |
82.98034898452103, | |
81.15849551944248, | |
85.2116748195986, | |
-83.20067331132182, | |
86.0305118859619, | |
93.16829004526869, | |
-56.72096416244479, | |
-77.60518356776531 | |
], | |
[ | |
-1.2378552385524266, | |
1.0036304366192623, | |
-1.6090159995321964, | |
2.0394495973086006, | |
-2.0180183762339814, | |
-1.3873816606742801, | |
-1.0921076991064267, | |
1.4708199557617438, | |
-1.5610521257407746, | |
-1.9666673209706442, | |
1.9076517668995745, | |
-1.040341749903375 | |
], | |
[ | |
-140.07549569653207, | |
159.79258368372882, | |
-151.127437087266, | |
121.71130403554734, | |
-141.38828696302818, | |
-150.83274265279388, | |
-164.8700178408228, | |
140.14741802182937, | |
-155.16546152004372, | |
-166.64050877887058, | |
112.77911212222166, | |
148.51991496622043 | |
], | |
[ | |
-192.41268009408034, | |
220.8347733584644, | |
-210.0422475439458, | |
167.97957633446296, | |
-195.6193849250513, | |
-202.8005919557673, | |
-216.60363528226284, | |
195.88577794127278, | |
-207.56261064595896, | |
-225.72144673652377, | |
143.59365538519984, | |
197.0929821983936 | |
], | |
[ | |
-28.16557705608608, | |
33.10058982579867, | |
-30.42362586778765, | |
25.463967855559, | |
-30.037162594547162, | |
-27.1780221951157, | |
-29.012190600654534, | |
29.46055196419518, | |
-28.545992349262605, | |
-30.547444878206573, | |
14.326183936375225, | |
22.847682776553654 | |
], | |
[ | |
-52.927836819688835, | |
59.928298086414046, | |
-57.63233394130635, | |
45.77995718777185, | |
-52.10930825304532, | |
-54.41806454664905, | |
-56.50225247051461, | |
52.78060231673277, | |
-54.86575873235864, | |
-60.2703962373473, | |
39.00509354075285, | |
50.7498660995501 | |
] | |
], | |
"w2": [ | |
[ | |
52.018661530077026 | |
], | |
[ | |
-55.44086180940142 | |
], | |
[ | |
54.045741372334284 | |
], | |
[ | |
-48.61944689242345 | |
], | |
[ | |
52.311190899741064 | |
], | |
[ | |
55.50646368409345 | |
], | |
[ | |
56.132466993080044 | |
], | |
[ | |
-52.31844356040513 | |
], | |
[ | |
55.59854459451529 | |
], | |
[ | |
58.05680177825883 | |
], | |
[ | |
-48.22523804471059 | |
], | |
[ | |
-54.561775545109555 | |
] | |
] | |
} | |
``` |