CCS-Lab / easyml

A toolkit for easily building and evaluating machine learning models.
https://ccs-lab.github.io/easyml
Other
40 stars 16 forks source link

Error in abs(coefs) #35

Closed paulhendricks closed 7 years ago

paulhendricks commented 7 years ago

Code:

library(easyml)

# Load data
political_ideology <- read.csv("../../data/political_ideology.csv", 
                               stringsAsFactors = FALSE)

# Analyze data
easy_glmnet(political_ideology, "y", 
            family = "binomial", random_state = 1, n_core = 8)

Result:

Error in abs(coefs) : non-numeric argument to mathematical function
In addition: Warning message:
In matrix(unlist(output), ncol = ncol(X) + 1, byrow = TRUE) :
  data length [1000] is not a sub-multiple or multiple of the number of columns [7472]
paulhendricks commented 7 years ago

Error arises due to there being three classes. Subsetting to just two classes works just fine.