Nano-robots or nano-devices with terahertz-based wireless communication capability provide a possibility for guided positioning in human blood vessels. Such localization provides the possibility of detecting the location of suspicious events (such as cancer cells, viruses and infections) along with the events themselves, and these facilities are used in medicine for early diagnosis and accurate treatment of the disease, and to reduce the cost and prevent invasive methods. The body is useful. Guided positioning is still in its initial stage and only a few researches have solved this problem. As an attempt to solve this problem, we propose a method based on machine learning algorithms for location based on environmental features and data from different sensors. With this, it is possible to estimate the location of events recorded by nanorobots, such as the observation of a cancerous mass, and treat them early, which greatly increases the chance of increasing the life expectancy of patients.