0

So I was trying to classify my data using Maximum Entropy method, with the code below:

container<-create_container(mat, sentiment_all, trainSize=1:823, testSize=824:1030, virgin=FALSE)
models<-train_models(container, algorithms = "MAXENT")
libresults<-classify_models(container, models)
table(as.character(sentiment_all[824:1030]),as.character(results[,"MAXENTROPY_LABEL"]))
recall_accuracy(sentiment_all[824:1030],results[,"MAXENTROPY_LABEL"])
create_precisionRecallSummary(container, results)

But just when I try to run this code:

models<-train_models(container, algorithms = "MAXENT")

it shows this error

Error in train_model(container, algorithm, ...) : 
  ERROR: Invalid algorithm specified. Type print_algorithms() for a list of available algorithms.

Note.

  • I tried to install package "maxent" but it said package "maxent" is not available (my version is R 3.6.3) and I did tried to upgrade to the latest version and the 3.5 version but nothing.
  • I tried to type "print_algorithms()" to see available algorithms but there's no maxent.
  • I already installed package "RTextTools"

Is there any way to fix this? I would really appreciate it.

  • 1
    [maxent](https://cran.r-project.org/web/packages/maxent/index.html) has been removed from CRAN. It looks like you could probably install an old version (by following the archive link) but it seems to not have been updated since 2011, so there might be some compatibility problems. See [this question](https://stackoverflow.com/q/59214665/4996248). – John Coleman Jun 15 '21 at 17:51
  • I see, so that's why it's not available. alright thank you, I will try that – Falira Paramitha Jun 16 '21 at 09:04

0 Answers0