Skip to content

NattapongSiri/ds_prep_euclidean.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test data science task with Rust

Example Business Scenario

Customer want to predict the movement of selected sensors.

Raw Data

Accumulated positions from 10 sensors that send a position in 3D space (x, y, z) every minutes. The data format is

[[x1,y1,z1], [x2, y2, z2], ...], # sensors data of first minute
[[x1,y1,z1], [x2, y2, z2], ...], # sensors data of second minute

An example of 2 records:

[[0,0,0], [1,1,1], [2,2,2], [3,3,3], [4,4,4], [5,5,5], [6,6,6], [7,7,7], [8,8,8], [9,9,9]],
[[0,0,0], [2,2,2], [0,0,0], [4,4,4], [5,5,5], [6,6,6], [7,7,7], [8,8,8], [9,9,9], [0, 0, 0]]

An data for testing can be found in data.txt

Data cleansing

Pick first 5 sensors data and leave out all the rest. For example, the data will become:

[[0,0,0], [1,1,1], [2,2,2], [3,3,3], [4,4,4]],
[[0,0,0], [2,2,2], [0,0,0], [4,4,4], [5,5,5]]

Data conversion

Calculate euclidean distance between each record on each sensor. For example, the result will be:

[0, 1, 2, 1, 1]

Implementation

All implementation can be found in src/main.rs

About

Test how fast can Rust be in data cleansing/manipulation job by filter out half of data then calculate euclidean distance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages