Discussion of article "Data Science and Machine Learning (Part 09) : The K-Nearest Neighbors Algorithm (KNN)"
Greetings!
Sorry if I'm wrong with my assumption, but I think, that
I think it should remove vector element with specific index, but it removes nothing, because nothing happens with original vector and function returns nothing.
Am I wrong?
Sorry if I'm wrong with my assumption, but I think, that
void CKNNNearestNeighbors::VectorRemoveIndex(vector &v, ulong index) { vector new_v(v.Size()-1); for (ulong i=0, count = 0; i<v.Size(); i++) if (i == index) { new_v[count] = new_v[i]; count++; } }is useless. Code is taken in KNN_neareast_neighbors.mqh file.
I think it should remove vector element with specific index, but it removes nothing, because nothing happens with original vector and function returns nothing.
Am I wrong?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
New article Data Science and Machine Learning (Part 09) : The K-Nearest Neighbors Algorithm (KNN) has been published:
This is a lazy algorithm that doesn't learn from the training dataset, it stores the dataset instead and acts immediately when it's given a new sample. As simple as it is, it is used in a variety of real-world applications
Few Things to Note:
Author: Omega J Msigwa