-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMachineLearning.py
More file actions
53 lines (28 loc) · 799 Bytes
/
MachineLearning.py
File metadata and controls
53 lines (28 loc) · 799 Bytes
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
import matplotlib.pyplot as plt
import numpy as np
import torch
from scipy import stats
def machine_learning_libs_test():
speed = [100, 80, 130, 111, 96, 110, 90, 94, 86, 150, 120, 144, 146]
rotation = [180, 90, 260, 360, 720, 144, 146, 80, 94, 86, 120, 1080, 333]
weights = torch.randn(53, 43, 6, 4)
inputs = torch.randn(16, 43, 23, 33)
tr = torch.nn.functional.conv2d(inputs, weights, rotation)
x = np.mean(speed)
y = stats.mode(speed)
z = np.median(speed)
s = np.std(speed)
p = np.percentile(speed, 90)
v = np.var(speed)
r = np.random.uniform(23, 35, 10000)
print(r)
print(y)
print(x)
print(z)
print(s)
print(v)
print(p)
print(tr)
plt.hist(r)
plt.show()
machine_learning_libs_test()