Skip to content

contefranz/aaiNB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aaiNB: Naive Bayes Classifiers for Financial Disclosure

The goal of aaiNB is to make the training sets used in the paper "Investor distraction and multi-dimensional financial narrative" to buil the Naive Bayes classifiers available to the public.

Rerefence

Gietzmann, M., Grossetti, F. & Lewis, C.M. Investor distraction and multi-dimensional financial narrative. Rev Account Stud 31, 334–373 (2026). https://doi.org/10.1007/s11142-026-09950-7

Installation

You can install the development version of aaiNB from GitHub with:

remotes::install_github("contefranz/aaiNB")

Example

This is a basic example which shows you how to train a classifier and apply it over a toy sample of randomly selected MD&A sentences.

library(aaiNB)

# Train Naive Bayes optimism classifier
optimism = train_NB_attributes(
  x = train_dfm_attributes, 
  y = train_dfm_attributes$optimism, 
  prior = "docfreq"
)
optimism

# Predict on some new sentences
data("item7_sent")
pred_nb_optimism = predict(optimism, newdata = item7_sent, force = TRUE)
head(nb_optimism)

About

Build Aggregate Attribute Index scores

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages