| LESSBinaryClassifier | R Documentation |
Auxiliary binary classifier for Learning with Subset Stacking (LESS)
R6 class of LESSBinaryClassifier
less::BaseEstimator -> less::SklearnEstimator -> less::LESSBase -> LESSBinaryClassifier
less::BaseEstimator$get_all_fields()less::BaseEstimator$get_attributes()less::SklearnEstimator$get_type()less::SklearnEstimator$predict()less::LESSBase$get_d_normalize()less::LESSBase$get_frac()less::LESSBase$get_isFitted()less::LESSBase$get_n_neighbors()less::LESSBase$get_n_replications()less::LESSBase$get_n_subsets()less::LESSBase$get_random_state()less::LESSBase$get_replications()less::LESSBase$get_scaling()less::LESSBase$get_val_size()new()Creates a new instance of R6 Class of LESSBinaryClassifier
LESSBinaryClassifier$new( frac = NULL, n_neighbors = NULL, n_subsets = NULL, n_replications = 20, d_normalize = TRUE, val_size = NULL, random_state = NULL, tree_method = function(X) KDTree$new(X), cluster_method = NULL, local_estimator = LinearRegression$new(), global_estimator = DecisionTreeClassifier$new(), distance_function = NULL, scaling = TRUE, warnings = TRUE )
fracfraction of total samples used for the number of neighbors (default is 0.05)
n_neighborsnumber of neighbors (default is NULL)
n_subsetsnumber of subsets (default is NULL)
n_replicationsnumber of replications (default is 20)
d_normalizedistance normalization (default is TRUE)
val_sizepercentage of samples used for validation (default is NULL - no validation)
random_stateinitialization of the random seed (default is NULL)
tree_methodmethod used for constructing the nearest neighbor tree, e.g., less::KDTree (default)
cluster_methodmethod used for clustering the subsets, e.g., less::KMeans (default is NULL)
local_estimatorestimator for the local models (default is less::LinearRegression)
global_estimatorestimator for the global model (default is less::DecisionTreeRegressor)
distance_functiondistance function evaluating the distance from a subset to a sample, e.g., df(subset, sample) which returns a vector of distances (default is RBF(subset, sample, 1.0/n_subsets^2))
scalingflag to normalize the input data (default is TRUE)
warningsflag to turn on (TRUE) or off (FALSE) the warnings (default is TRUE)
fit()Dummy fit function that calls the proper method according to validation and clustering parameters Options are:
Default fitting (no validation set, no clustering)
Fitting with validation set (no clustering)
Fitting with clustering (no) validation set)
Fitting with validation set and clustering
LESSBinaryClassifier$fit(X, y)
X2D matrix or dataframe that includes predictors
y1D vector or (n,1) dimensional matrix/dataframe that includes response variables
Fitted R6 Class of LESSBinaryClassifier
predict_proba()Prediction probabilities are evaluated for the test samples in X0
LESSBinaryClassifier$predict_proba(X0)
X02D matrix or dataframe that includes predictors
get_global_estimator()Auxiliary function returning the global_estimator
LESSBinaryClassifier$get_global_estimator()
set_random_state()Auxiliary function that sets random state attribute of the self class
LESSBinaryClassifier$set_random_state(random_state)
random_stateseed number to be set as random state
self
clone()The objects of this class are cloneable with this method.
LESSBinaryClassifier$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.