monoboost.MonoBoost

class monoboost.MonoBoost(n_feats, incr_feats, decr_feats, num_estimators=10, fit_algo='L2-one-class', eta=1.0, vs=[0.001, 0.1, 0.25, 0.5, 1], verbose=False, hp_reg=None, hp_reg_c=None, incomp_pred_type='default', learner_type='one-sided', random_state=None, standardise=True)
Partially Monotone Boosting classifier
var

Attributes

eg_attr: list of DecisionTreeClassifier The collection of fitted sub-estimators.

Methods

fit(X, y) Fits one hyperplane per non-monotone feature Parameters ———- X : array-like or sparse matrix of shape = [n_samples, n_features] The training input samples.
fit_cache(X, y, svm_vs)
get_deltas(X_base_pt, X, y)
predict(X_pred[, cum])
predict_proba(X_pred[, cum]) Predict class or regression value for X.
solve_hp(incr_feats, decr_feats, delta_X, v)
transform(X) Transform dataset.
__hash__

Return hash(self).

fit(X, y)

Fits one hyperplane per non-monotone feature Parameters ———- X : array-like or sparse matrix of shape = [n_samples, n_features]

The training input samples. Internally, its dtype will be converted to dtype=np.float32. If a sparse matrix is provided, it will be converted into a sparse csc_matrix.
y : array-like, shape = [n_samples] or [n_samples, n_outputs]
The target values (class labels in classification, real numbers in regression).
feat_softening_angles : array-like, shape = [m]
an angle for each feature, ignored for mt feats, and used as softening angle otherwise (in degrees)
self : object
Returns self.
predict_proba(X_pred, cum=False)

Predict class or regression value for X. For a classification model, the predicted class for each sample in X is returned. For a regression model, the predicted value based on X is returned. Parameters ———- X : array-like or sparse matrix of shape = [n_samples, n_features]

The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse matrix is provided to a sparse csr_matrix.
cum : boolean, (default=False)
True to include predictions for all stages cumulatively.
y : array of shape = [n_samples] or [n_samples, n_outputs]
The predicted classes, or the predict values.
transform(X)

Transform dataset.

Parameters:X: array-like matrix :
Returns:X_transformed: array-like matrix, shape=(n_samples, 1) :
y_maj_class_calc

I’m the ‘x’ property.

y_pred_num_comp

I’m the ‘x’ property.

Examples using monoboost.MonoBoost