DashAI.back.models.DecisionTreeClassifier
- class DecisionTreeClassifier(**kwargs)[source]
Scikit-learn’s Decision Tree Classifier wrapper for DashAI.
Methods
__init__(**kwargs)apply(X[, check_input])Return the index of the leaf that each sample is predicted as.
calculate_metrics([split, level, log_index, ...])Calculate and save metrics for a given data split and level.
cost_complexity_pruning_path(X, y[, ...])Compute the pruning path during Minimal Cost-Complexity Pruning.
decision_path(X[, check_input])Return the decision path in the tree.
fit(X, y[, sample_weight, check_input])Build a decision tree classifier from the training set (X, y).
get_depth()Return the depth of the decision tree.
get_metadata_routing()Get metadata routing of this object.
get_n_leaves()Return the number of leaves of the decision tree.
get_params([deep])Get parameters for this estimator.
get_schema()Generates the component related Json Schema.
load(filename)Load the model of the specified path.
predict(x_pred)Make a prediction with the model.
predict_log_proba(X)Predict class log-probabilities of the input samples X.
predict_proba(X[, check_input])Predict class probabilities of the input samples X.
prepare_dataset(dataset[, is_fit])Apply the model transformations to the dataset.
prepare_output(dataset[, is_fit])Prepare output targets using Label encoding.
save(filename)Save the model in the specified path.
score(X, y[, sample_weight])Return accuracy on provided data and labels.
set_fit_request(*[, sample_weight])Configure whether metadata should be requested to be passed to the
fitmethod.set_params(**params)Set the parameters of this estimator.
set_score_request(*[, sample_weight])Configure whether metadata should be requested to be passed to the
scoremethod.train(x_train, y_train[, x_validation, ...])Train the model with the provided data.
validate_and_transform(raw_data)It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.
Attributes
CATEGORICAL_ENCODINGCOLORCOMPATIBLE_COMPONENTSDISPLAY_NAMETYPEfeature_importances_Return the feature importances.