Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

predictlm

The goal of predictlm is to provide an R interface to PredictLM model checkpoints from Zero One Research. For more information please see the official website: https://zerooneresearch.ai/models/

Installation

You can install the development version of predictlm like so:

pak::pak('frankiethull/predictlm')

Example

library(predictlm)
library(rsample)

corn_data <- maize::corn_data

corn_splits <- initial_validation_split(corn_data)
train <- training(corn_splits)
validate <- validation(corn_splits)
test <- testing(corn_splits)

Classification

fit_cls <- predictlm_fit(
  train |> dplyr::select(-type),
  train$type,
  device = "cpu"
)

class_preds <- predictlm_predict(fit_cls, test |> dplyr::select(-type))

class_preds |> head()
#> [1] "Sweet" "Sweet" "Sweet" "Sweet" "Sweet" "Sweet"

Regression

fit_reg <- predictlm_fit(
  train |> dplyr::select(-height, -type),
  train$height,
  problem_type = "regression",
  device = "cpu"
)

preds <- predictlm_predict(fit_reg, test |> dplyr::select(-height, -type))

preds |> head()
#> [1] 70.34669 58.83693 60.45285 57.99476 61.91698 65.20015

About

R Interface for PredictLM: A Tabular Foundation Model from Zero One Research

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages