decomm ml, target algorithm a dalsi upravy

This commit is contained in:
David Brazda
2023-12-06 10:51:50 +01:00
parent d38bf0600f
commit 6cdc0a45c5
32 changed files with 1112 additions and 877 deletions

View File

@ -1,12 +1,14 @@
import scipy.interpolate as spi
import matplotlib.pyplot as plt
import numpy as np
# x = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
# y = [4, 7, 11, 16, 22, 29, 38, 49, 63, 80]
x = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
y = [4, 7, 11, 16, 22, 29, 38, 49, 63, 80]
y_interp = spi.interp1d(x, y)
val = 10
new = np.interp(val, [0, 50, 100], [0, 1, 2])
print(new)
# y_interp = spi.interp1d(x, y)
#find y-value associated with x-value of 13
#print(y_interp(13))