Note that there are some explanatory texts on larger screens.

plurals
  1. POR "Pool" support vector machines for subsetting data sets
    primarykey
    data
    text
    <p>Facts for svm: </p> <p>positve data set 20 samples, 5 factors negative data set 10000 samples, 5 factors package: e1071 or kernel My test dataset would be something like 15000 samples</p> <p>To control this imbalance i tried to use the class weight in e1071, as suggested in previous questions.But i cannot see any differences also whole overweighting one class extremely. Now i was thinking to subset my negative data set randomly in 100 sub negative datasets. Like this</p> <pre><code>cost&lt;-vector("numeric", length(1)) gamma &lt;- vector("numeric", length(1)) accuracy&lt;- vector("numeric" , length(1) </code></pre> <p>)</p> <h2>Function definition</h2> <pre><code>split_data&lt;- function(x,repeats) { for (i in 1:repeats){ random_data &lt;- x[sample(1:nrow(x), 100),] dat&lt;- rbind(data_pos, random_data) svm &lt;- svm(Class~., data=dat, cross=10) cost[i] &lt;- svm$cost gamma[i] &lt;-svm$gamma accuracy[i]&lt;- svm$tot.accuracy print(summary(svm)) } return(matrix(c(cost,gamma,accuracy), ncol=3)) } </code></pre> <p>But Im not sure what to do now with ... :D Its seems to define always the same support vectors in my pos data set. But there should be a smarter strategy, i have read about some strategies but is it possible to realize them in R with any package? </p> <p>Edit: </p> <p>I would like to find an approach how i can deal with highly imbalanced datasets.And i would like to do it in this way: to split my negative data set (resampled test data set) in equal portions to my positive dataset. However I would then somehow like to get the complete accuracy and sensitivity. My question in particular is: how can i manage this in R a nice way?</p> <p>Thanks a lot </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload