I'm constructing an optimization (Bayesian optimization) algorithm using Java code. I have created the program, but the similarity values between inputted vectors in the kernel equation does not translate into the output similarity expected between vectors that should be "similar". I have a suspicion this has to do with the weighting of the differences between each of the components of the vectors because the parameter ranges of the different components are of completely different magnitudes (for example one parameter has a range 0.0 - 0.9 and another has a range of 100 - 500000).
I guess my question falls into two parts. First, how do I weight each the of the components of the input vectors evenly? Second, do I make the hyperparameters (width variable and sigma) vectors or scalar values?
I've been using this function I found from this other question (Which is helpful, but does not fully answer any of my questions): Kernels in Gaussian Processes
$$f(x_i,x_k)=σ^2 \exp\left(−\frac{1}{2 \ell^2} \sum_{j=1}^q (x_{i,j} − x_{k,j})^2 \right)$$