Skip to content

Conversation

@EmilHvitfeldt
Copy link
Member

@EmilHvitfeldt EmilHvitfeldt commented Jan 27, 2022

This PR aims to close #634.

library(parsnip)

cubist_rules() %>%
  fit(mpg ~ ., data = mtcars)
#> Error: No engines where loaded for `cubist_rules`. Please load extension package that provides one.

pls() %>%
  set_mode("regression") %>%
  fit(mpg ~ ., data = mtcars)
#> Error: No engines where loaded for `pls`. Please load extension package that provides one.

linear_reg() %>%
  fit(mpg ~ ., data = mtcars)
#> parsnip model object
#> 
#> 
#> Call:
#> stats::lm(formula = mpg ~ ., data = data)
#> 
#> Coefficients:
#> (Intercept)          cyl         disp           hp         drat           wt  
#>    12.30337     -0.11144      0.01334     -0.02148      0.78711     -3.71530  
#>        qsec           vs           am         gear         carb  
#>     0.82104      0.31776      2.52023      0.65541     -0.19942

library(plsmod)

pls() %>%
  set_mode("regression") %>%
  fit(mpg ~ ., data = mtcars)
#> parsnip model object
#> 
#> 
#> Call:
#>  mixOmics::spls(X = x, Y = y, ncomp = ncomp, keepX = keepX) 
#> 
#>  sPLS with a 'regression' mode with 10 sPLS components. 
#>  You entered data X of dimensions: 32 10 
#>  You entered data Y of dimensions: 32 1 
#> 
#>  Selection of [10] [10] [10] [10] [10] [10] [10] [10] [10] [10] variables on each of the sPLS components on the X data set. 
#>  Selection of [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] variables on each of the sPLS components on the Y data set. 
#> 
#>  Main numerical outputs: 
#>  -------------------- 
#>  loading vectors: see object$loadings 
#>  variates: see object$variates 
#>  variable names: see object$names 
#> 
#>  Functions to visualise samples: 
#>  -------------------- 
#>  plotIndiv, plotArrow 
#> 
#>  Functions to visualise variables: 
#>  -------------------- 
#>  plotVar, plotLoadings, network, cim

Created on 2022-01-26 by the reprex package (v2.0.1)

@EmilHvitfeldt EmilHvitfeldt requested a review from topepo January 27, 2022 00:29
@github-actions
Copy link
Contributor

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There should be a check to make sure an fit method is registered

4 participants