Giter Club home page Giter Club logo

ainr's Introduction

ainr - AI Ninja R Utilities

It is currently able to push Lavaan and Mirt models to AI Ninja for post hoc score estimation.

Install the package:

install.packages("remotes")
remotes::install_github("ianrothmann/ainr")

You need to install.packages("dotenv") and create a .env file in your project.

The env file should look like this:

AIN_URL=https://api.aininja.dev
AIN_KEY=[Your key here]
#Add an empty line at the end

In your project, import dotenv and load your env file as follows:

library(dotenv)
load_dot_env(file = "~/Dev/r/ainr/.env")

For Lavaan models:

library(lavaan)
library(ainr)

#Normally estimate your model through lavaan
fit <- sem(model, data=myData, estimator = "WLSMV", ordered = c(...))

#Upload your model to AI Ninja
ain.uploadLavaanModel('model_name',model.cons.fit) #replace model_name with a name and version of your model you would like to deploy.

It would be a good idea to test score estimation on your model using lavPredict before uploading.

For Mirt models:

library(mirt)
library(ainr)

#Normally estimate your model through mirt
cmod <- mirt(myData, itemtype="Rasch", SE=TRUE, verbose=FALSE)

#Upload your model to AI Ninja
ain.uploadMirtModel('model_name',cmod) #replace model_name with a name and version of your model you would like to deploy.

It would be a good idea to test score estimation on your model using fscores before uploading.

ainr's People

Contributors

ianrothmann avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.