Title: | Specialty Kernels for SVMs |
---|---|
Description: | Bindings for svm kernels via kernlab for use with the 'parsnip' package. Specifically related to specialty kernels for support vector machines not available in parsnip. package includes interface for various kernlab kernels and custom kernels too. |
Authors: | Frankie T. Hull [aut, cre], Max Kuhn [ctb] |
Maintainer: | Frankie T. Hull <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9031415 |
Built: | 2024-11-10 02:43:40 UTC |
Source: | https://github.com/frankiethull/maize |
Synthetic Corn Dataset for Corny Example
Asked Claude Sonnet for a corn data given the README story problem
corn_data |
a tibble |
claude-3-5-sonnet-20240620
data(corn_data) str(corn_data)
data(corn_data) str(corn_data)
step_kha_laplace()
creates a specification of a recipe step that will
convert numeric data into one or more principal components using a laplace
kernel basis expansion.
step_kha_laplace( recipe, ..., role = "predictor", trained = FALSE, num_comp = 5, res = NULL, columns = NULL, sigma = 0.2, learn_rate = 0.005, threshold = 1e-04, stop_iter = 100, prefix = "kha", keep_original_cols = FALSE, skip = FALSE, id = rand_id("kha_laplace") )
step_kha_laplace( recipe, ..., role = "predictor", trained = FALSE, num_comp = 5, res = NULL, columns = NULL, sigma = 0.2, learn_rate = 0.005, threshold = 1e-04, stop_iter = 100, prefix = "kha", keep_original_cols = FALSE, skip = FALSE, id = rand_id("kha_laplace") )
recipe |
A recipe object. The step will be added to the sequence of operations for this recipe. |
... |
One or more selector functions to choose variables
for this step. See |
role |
For model terms created by this step, what analysis role should they be assigned? By default, the new columns created by this step from the original variables will be used as predictors in a model. |
trained |
A logical to indicate if the quantities for preprocessing have been estimated. |
num_comp |
The number of components to retain as new predictors.
If |
res |
An S4 |
columns |
A character string of the selected variable names. This field
is a placeholder and will be populated once |
sigma |
A numeric value for the laplace function parameter. |
learn_rate |
hebbian learning rate |
threshold |
the smallest value of the convergence step |
stop_iter |
maximum number of iterations |
prefix |
A character string for the prefix of the resulting new variables. See notes below. |
keep_original_cols |
A logical to keep the original variables in the
output. Defaults to |
skip |
A logical. Should the step be skipped when the
recipe is baked by |
id |
A character string that is unique to this step to identify it. |
Other multivariate transformation steps:
step_kha_tanh()
,
step_kpca_laplace()
,
step_kpca_tanh()
step_kha_tanh()
creates a specification of a recipe step that will
convert numeric data into one or more principal components using a tanh
kernel basis expansion.
step_kha_tanh( recipe, ..., role = "predictor", trained = FALSE, num_comp = 5, res = NULL, columns = NULL, scale_factor = 0.2, learn_rate = 0.005, threshold = 1e-04, stop_iter = 100, prefix = "kha", keep_original_cols = FALSE, skip = FALSE, id = rand_id("kha_tanh") )
step_kha_tanh( recipe, ..., role = "predictor", trained = FALSE, num_comp = 5, res = NULL, columns = NULL, scale_factor = 0.2, learn_rate = 0.005, threshold = 1e-04, stop_iter = 100, prefix = "kha", keep_original_cols = FALSE, skip = FALSE, id = rand_id("kha_tanh") )
recipe |
A recipe object. The step will be added to the sequence of operations for this recipe. |
... |
One or more selector functions to choose variables
for this step. See |
role |
For model terms created by this step, what analysis role should they be assigned? By default, the new columns created by this step from the original variables will be used as predictors in a model. |
trained |
A logical to indicate if the quantities for preprocessing have been estimated. |
num_comp |
The number of components to retain as new predictors.
If |
res |
An S4 |
columns |
A character string of the selected variable names. This field
is a placeholder and will be populated once |
scale_factor |
A numeric value for the tanh function parameter. |
learn_rate |
hebbian learning rate |
threshold |
the smallest value of the convergence step |
stop_iter |
maximum number of iterations |
prefix |
A character string for the prefix of the resulting new variables. See notes below. |
keep_original_cols |
A logical to keep the original variables in the
output. Defaults to |
skip |
A logical. Should the step be skipped when the
recipe is baked by |
id |
A character string that is unique to this step to identify it. |
Other multivariate transformation steps:
step_kha_laplace()
,
step_kpca_laplace()
,
step_kpca_tanh()
step_kpca_laplace()
creates a specification of a recipe step that will
convert numeric data into one or more principal components using a laplace
kernel basis expansion.
step_kpca_laplace( recipe, ..., role = "predictor", trained = FALSE, num_comp = 5, res = NULL, columns = NULL, sigma = 0.2, prefix = "kPC", keep_original_cols = FALSE, skip = FALSE, id = rand_id("kpca_laplace") )
step_kpca_laplace( recipe, ..., role = "predictor", trained = FALSE, num_comp = 5, res = NULL, columns = NULL, sigma = 0.2, prefix = "kPC", keep_original_cols = FALSE, skip = FALSE, id = rand_id("kpca_laplace") )
recipe |
A recipe object. The step will be added to the sequence of operations for this recipe. |
... |
One or more selector functions to choose variables
for this step. See |
role |
For model terms created by this step, what analysis role should they be assigned? By default, the new columns created by this step from the original variables will be used as predictors in a model. |
trained |
A logical to indicate if the quantities for preprocessing have been estimated. |
num_comp |
The number of components to retain as new predictors.
If |
res |
An S4 |
columns |
A character string of the selected variable names. This field
is a placeholder and will be populated once |
sigma |
A numeric value for the laplace function parameter. |
prefix |
A character string for the prefix of the resulting new variables. See notes below. |
keep_original_cols |
A logical to keep the original variables in the
output. Defaults to |
skip |
A logical. Should the step be skipped when the
recipe is baked by |
id |
A character string that is unique to this step to identify it. |
Other multivariate transformation steps:
step_kha_laplace()
,
step_kha_tanh()
,
step_kpca_tanh()
step_kpca_tanh()
creates a specification of a recipe step that will
convert numeric data into one or more principal components using a tanh
kernel basis expansion.
step_kpca_tanh( recipe, ..., role = "predictor", trained = FALSE, num_comp = 5, res = NULL, columns = NULL, scale_factor = 0.2, prefix = "kPC", keep_original_cols = FALSE, skip = FALSE, id = rand_id("kpca_tanh") )
step_kpca_tanh( recipe, ..., role = "predictor", trained = FALSE, num_comp = 5, res = NULL, columns = NULL, scale_factor = 0.2, prefix = "kPC", keep_original_cols = FALSE, skip = FALSE, id = rand_id("kpca_tanh") )
recipe |
A recipe object. The step will be added to the sequence of operations for this recipe. |
... |
One or more selector functions to choose variables
for this step. See |
role |
For model terms created by this step, what analysis role should they be assigned? By default, the new columns created by this step from the original variables will be used as predictors in a model. |
trained |
A logical to indicate if the quantities for preprocessing have been estimated. |
num_comp |
The number of components to retain as new predictors.
If |
res |
An S4 |
columns |
A character string of the selected variable names. This field
is a placeholder and will be populated once |
scale_factor |
A numeric value for the tanh function parameter. |
prefix |
A character string for the prefix of the resulting new variables. See notes below. |
keep_original_cols |
A logical to keep the original variables in the
output. Defaults to |
skip |
A logical. Should the step be skipped when the
recipe is baked by |
id |
A character string that is unique to this step to identify it. |
Other multivariate transformation steps:
step_kha_laplace()
,
step_kha_tanh()
,
step_kpca_laplace()
anova rbf for support vector machines
svm_anova_rbf( mode = "unknown", engine = "kernlab", cost = NULL, anova_rbf_sigma = NULL, degree = NULL, margin = NULL )
svm_anova_rbf( mode = "unknown", engine = "kernlab", cost = NULL, anova_rbf_sigma = NULL, degree = NULL, margin = NULL )
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
anova_rbf_sigma |
sigma parameter for anova rbf |
degree |
degree parameter for anova rbf |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
bessel kernel for support vector machines
svm_bessel( mode = "unknown", engine = "kernlab", cost = NULL, bessel_sigma = NULL, degree = NULL, order = NULL, margin = NULL )
svm_bessel( mode = "unknown", engine = "kernlab", cost = NULL, bessel_sigma = NULL, degree = NULL, order = NULL, margin = NULL )
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
bessel_sigma |
sigma parameter for bessel |
degree |
degree parameter for bessel |
order |
order parameter for bessel |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
cauchy kernel for support vector machines
svm_cauchy( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, sigma = NULL )
svm_cauchy( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, sigma = NULL )
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
sigma |
a sigma parameter for cauchy kernels |
cossim kernel for support vector machines
svm_cossim(mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL)
svm_cossim(mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL)
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
fourier kernel for support vector machines
svm_fourier( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, sigma = NULL )
svm_fourier( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, sigma = NULL )
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
sigma |
a sigma parameter for fourier kernels |
laplacian kernel for support vector machines
svm_laplace( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, laplace_sigma = NULL )
svm_laplace( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, laplace_sigma = NULL )
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
laplace_sigma |
sigma parameter for laplacian |
sorensen kernel for support vector machines which is used as a graph kernel for chemical informatics
svm_sorensen(mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL)
svm_sorensen(mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL)
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
spline kernel for support vector machines
svm_spline(mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL)
svm_spline(mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL)
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
stringdot for support vector machines
svm_string( x, y, mode = "unknown", engine = "kernlab", cost = NULL, length = NULL, lambda = NULL, normalized = TRUE, margin = NULL )
svm_string( x, y, mode = "unknown", engine = "kernlab", cost = NULL, length = NULL, lambda = NULL, normalized = TRUE, margin = NULL )
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
length |
The length of the substrings considered |
lambda |
The decay factor |
normalized |
normalize string kernel values, (default = TRUE) |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
tanh kernel for support vector machines
svm_tanh( mode = "unknown", engine = "kernlab", cost = NULL, scale_factor = NULL, margin = NULL )
svm_tanh( mode = "unknown", engine = "kernlab", cost = NULL, scale_factor = NULL, margin = NULL )
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
scale_factor |
scale parameter for tanh |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
tanimoto kernel for support vector machines which is used as a graph kernel for chemical informatics
svm_tanimoto(mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL)
svm_tanimoto(mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL)
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
t-student kernel for support vector machines
svm_tstudent( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, degree = NULL )
svm_tstudent( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, degree = NULL )
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
degree |
a degree parameter for tstudent kernels |
wavelet kernel for support vector machines
svm_wavelet( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, sigma = NULL, a = 1, c = NULL, h = NULL )
svm_wavelet( mode = "unknown", engine = "kernlab", cost = NULL, margin = NULL, sigma = NULL, a = 1, c = NULL, h = NULL )
mode |
regression or classification |
engine |
kernlab ksvm |
cost |
A positive number for the cost of predicting a sample within or on the wrong side of the margin |
margin |
A positive number for the epsilon in the SVM insensitive loss function (regression only) |
sigma |
sigma parameter for svm wavelet kernel |
a |
scale adjustment parameter for wavelet kernels (temp name) |
c |
dist adjustment parameter for wavelet kernels can be NULL (temp name) |
h |
wavelet function for wavelet kernel, default wavelet if NULL (temp name) |