[R] machine learning to define contours in R

Luigi Marongiu m@rong|u@|u|g| @end|ng |rom gm@||@com
Fri Oct 22 16:49:08 CEST 2021


Hello,
I have run some support vector machine analysis. If I draw a grid of
10*10 points in a space, the model I built will assign the points to a
given group. Lets' say:
```
results1 = data.frame(row_1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
                                   row_2 = c(0, 0, 0, 1, 0, 0, 0, 0, 0, 0),
                                   row_3 = c(0, 0, 1, 1, 1, 0, 0, 0, 0, 0),
                                   row_4 = c(0, 1, 1, 1, 1, 1, 0, 0, 0, 0),
                                   row_5 = c(0, 0, 1, 1, 1, 0, 0, 0, 0, 0),
                                   row_6 = c(0, 0, 0, 1, 0, 0, 0, 0, 0, 0),
                                   row_7 = c(0, 0, 0, 0, 0, 2, 2, 2, 0, 0),
                                   row_8 = c(0, 0, 0, 0, 0, 2, 2, 2, 0, 0),
                                   row_9 = c(0, 0, 0, 0, 0, 2, 2, 2, 0, 0),
                                 row_10 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
```
If I repeat the analysis, the assignment is different:
 ```
results2 = data.frame(row_1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
                                   row_2 = c(0, 0, 0, 1, 0, 0, 0, 0, 0, 0),
                                   row_3 = c(0, 0, 1, 1, 1, 0, 0, 0, 0, 0),
                                   row_4 = c(0, 0, 1, 1, 1, 1, 1, 1, 0, 0),
                                   row_5 = c(0, 0, 1, 1, 1, 0, 0, 0, 0, 0),
                                   row_6 = c(0, 1, 0, 1, 1, 0, 0, 0, 0, 0),
                                   row_7 = c(0, 0, 0, 0, 0, 2, 2, 2, 0, 0),
                                   row_8 = c(0, 0, 0, 0, 0, 0, 2, 0, 0, 0),
                                   row_9 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
                                 row_10 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
```
To note that in results2 there are differences in rows 4, 6, 8, 9.
Is it possible to create a new object containing the points with 100%
(or 95%) identity? Some kind of machine learning algorithm?
Thank you



More information about the R-help mailing list