java - Finding the mathematical algorithm to which matches an input and output together -
as end result, computer program can accept list of inputs , outputs , apply same algorithm went input/output's on number, i.e:
if given list of input/output's
2:4 4:8 100:200
it realize algorithm (input * 2), or (output / 2) depending on wanted.
so, if given number 16, , asked produce output program respond 32. , if given number 10 , asked produce input, respond 5.
it rather simple 'hardcode' program, although i'd learn how have program teach algorithm is. understand rather complicated rather fast.
you can not reliably type of input/output signal dependency instead should support otherwise need kind of ai or very complex neural network + many functional generators insane complexity , unknown reliability of solution ...
i simplify dependencies like:
polynomial degree
- (can use interpolation/approximation)
y=a0+a1*x+a2*x*x+a3*x*x*x
exponential
y=a0+a1^x
other
- if want support things sin waves etc need many inputs not few decide type of dependency.
anyway think 3 input points not enough
- for example polynomial
a0+a1*x+a2*x*x+a3*x*x*x=y
needs @ least 4 points
so @ first should determine type of dependency , try find coefficients of particular function generator. example:
- if have inputs
x0<x1<x2<x3,...
, outputsy0,y1,y2,y3,..
- and
k0=y0/x0,k1=y1/x1,...
- if
k0<<k1<<k2<<k3<<...
ork0>>k1>>k2>>k3>>...
exponential dependency - otherwise use polynomial ...
if have mixed type signals need more input points covering big enough range , need kind of approximation search of coefficients minimizing distance between known inputs , generated output. if have enough points can normalize dataset , use correlation coefficient compare supported function generators simplify decisioning
[notes]
so need specify:
- what kind of dependencies supported (types,singular,combined)
- how many input points have (minimum, recommended etc...)
- what target precision/error
- what target ranges of x,y
Comments
Post a Comment