Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

High-Level Modeling Functions with 'torch'

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
NotificationsYou must be signed in to change notification settings

tidymodels/brulee

Repository files navigation

R-CMD-checkCodecov test coverageLifecycle: experimental

The Rbrulee package contains several basic modeling functions thatuse thetorch package infrastructure, such as:

Installation

You can install the released version of brulee fromCRAN with:

install.packages("brulee")

And the development version fromGitHub with:

# install.packages("pak")pak::pak("tidymodels/brulee")

Example

brulee has formula, x/y, and recipe user interfaces for each function.For example:

library(brulee)library(recipes)library(yardstick)data(bivariate,package="modeldata")set.seed(20)nn_log_biv<- brulee_mlp(Class~ log(A)+ log(B),data=bivariate_train,epochs=150,hidden_units=3)# We use the tidymodels semantics to always return a tibble when predictingpredict(nn_log_biv,bivariate_test,type="prob")|>   bind_cols(bivariate_test)|>   roc_auc(Class,.pred_One)#> # A tibble: 1 × 3#>   .metric .estimator .estimate#>   <chr>   <chr>          <dbl>#> 1 roc_auc binary         0.840

A recipe can also be used if the data require some sort of preprocessing(e.g., indicator variables, transformations, or standardization):

library(recipes)rec<-   recipe(Class~.,data=bivariate_train)|>    step_YeoJohnson(all_numeric_predictors())|>   step_normalize(all_numeric_predictors())set.seed(20)nn_rec_biv<- brulee_mlp(rec,data=bivariate_train,epochs=150,hidden_units=3)# A little betterpredict(nn_rec_biv,bivariate_test,type="prob")|>   bind_cols(bivariate_test)|>   roc_auc(Class,.pred_One)#> # A tibble: 1 × 3#>   .metric .estimator .estimate#>   <chr>   <chr>          <dbl>#> 1 roc_auc binary         0.862

Code of Conduct

Please note that the brulee project is released with aContributor CodeofConduct.By contributing to this project, you agree to abide by its terms.

About

High-Level Modeling Functions with 'torch'

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors13

Languages


[8]ページ先頭

©2009-2025 Movatter.jp