quanteda / quanteda.textmodels
Showing 1 of 1 files from the diff.

@@ -92,12 +92,12 @@
Loading
92 92
    result <- list(
93 93
        x = x, y = y,
94 94
        weights = svmlinfitted$weights,
95 -
        algorithm = factor(svmlinfitted$algorithm, levels = 0:3,
96 -
                           labels = c("Regularized Least Squares Classification",
97 -
                                      "SVM",
98 -
                                      "Multi-switch Transductive SVM",
99 -
                                      "Deterministic Annealing Semi-supervised SVM")),
100 -
        classnames = svmlinfitted$classnames,
95 +
        # algorithm = factor(svmlinfitted$algorithm, levels = 0:3,
96 +
        #                    labels = c("Regularized Least Squares Classification",
97 +
        #                               "SVM",
98 +
        #                               "Multi-switch Transductive SVM",
99 +
        #                               "Deterministic Annealing Semi-supervised SVM")),
100 +
        # classnames = svmlinfitted$classnames,
101 101
        intercept = intercept,
102 102
        call = call
103 103
    )
@@ -151,8 +151,9 @@
Loading
151 151
    pred_y <- as.numeric(data %*% object$weights)
152 152
    names(pred_y) <- docnames(data)
153 153
154 +
    classnames <- levels(object$y)
154 155
    if (type == "class") {
155 -
        pred_y <- ifelse(pred_y < 0, object$classnames[1], object$classnames[2])
156 +
        pred_y <- ifelse(pred_y < 0, classnames[1], classnames[2])
156 157
    } else if (type == "probability") {
157 158
        stop("probability type not implemented yet")
158 159
    }
Files Coverage
R 84.11%
src 47.32%
Project Totals (20 files) 65.74%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading