The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
## Warning: package 'doParallel' was built under R version 4.4.3
## Loading required package: foreach
## Loading required package: iterators
## Loading required package: parallel
## quickSentiment: Retaining negation words (e.g., 'not', 'no', 'never') to preserve sentiment polarity. To apply the strict stopword list instead, set `retain_negations = FALSE`. View qs_negations for more
result <- pipeline(
# --- Define the vectorization method ---
# Options: "bow" (raw counts), "tf" (term frequency), "tfidf", "binary"
vect_method = "tf",
# --- Define the model to train ---
# Options: "logit", "rf", "xgb","nb"
model_name = "rf",
# --- Specify the data and column names ---
text_vector = tweets$cleaned_text , # The column with our preprocessed text
sentiment_vector = tweets$sentiment, # The column with the target variable
# --- Set vectorization options ---
# Use n_gram = 2 for unigrams + bigrams, or 1 for just unigrams
n_gram = 1,
parallel = cores
)## --- Running Pipeline: TERM_FREQUENCY + RANDOM_FOREST ---
## Data split: 944 training elements, 237 test elements.
## Vectorizing with TERM_FREQUENCY (ngram=1)...
## - Fitting BoW model (term_frequency) on training data...
## - Applying BoW transformation (term_frequency) to new data...
##
## --- Training Random Forest Model (ranger) ---
## --- Random Forest complete. Returning results. ---
##
## ======================================================
## PIPELINE COMPLETE: TERM_FREQUENCY + RANDOM_FOREST
## Model AUC: 0.690
## Recommended ROC Threshold: 0.279
## ======================================================
## --- Preparing new data for prediction ---
## - Applying BoW transformation (term_frequency) to new data...
## Using optimized threshold: 0.279
## --- Making Predictions ---
## --- Prediction Complete ---
## predicted_class prob_N prob_P
## 1 P 0.4664830 0.5335170
## 2 P 0.3152195 0.6847805
## 3 P 0.3464905 0.6535095
## 4 P 0.3411345 0.6588655
## 5 P 0.3740126 0.6259874
## 6 P 0.2542101 0.7457899
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.