chembee.config.calibration package
Submodules
chembee.config.calibration.kmeans module
chembee.config.calibration.knn module
- class chembee.config.calibration.knn.KNeighborsClassifierAlgorithm(n_neighbors=5, *, weights='uniform', algorithm='auto', leaf_size=30, p=2, metric='minkowski', metric_params=None, n_jobs=None)[source]
Bases:
KNeighborsClassifier
- hyperparameters = [{'n_neighbors': [1, 2, 3, 4, 5, 6, 7, 8], 'weights': ['uniform', 'distance'], 'p': [1, 2, 3, 4]}]
- name = 'knn'
chembee.config.calibration.linear_regression module
- class chembee.config.calibration.linear_regression.LinearRegressionClass(*, fit_intercept=True, normalize='deprecated', copy_X=True, n_jobs=None, positive=False)[source]
Bases:
LinearRegression
- fit(X, y)[source]
Fit linear model.
- X{array-like, sparse matrix} of shape (n_samples, n_features)
Training data.
- yarray-like of shape (n_samples,) or (n_samples, n_targets)
Target values. Will be cast to X’s dtype if necessary.
- sample_weightarray-like of shape (n_samples,), default=None
Individual weights for each sample.
New in version 0.17: parameter sample_weight support to LinearRegression.
- selfobject
Fitted Estimator.
- name = 'linr'
chembee.config.calibration.logistic_regression module
- class chembee.config.calibration.logistic_regression.LogisticRegressionClassifierAlgorithm(penalty='l2', *, dual=False, tol=0.0001, C=1.0, fit_intercept=True, intercept_scaling=1, class_weight=None, random_state=None, solver='lbfgs', max_iter=100, multi_class='auto', verbose=0, warm_start=False, n_jobs=None, l1_ratio=None)[source]
Bases:
LogisticRegression
- name = 'logr'
chembee.config.calibration.mlp_classifier module
- class chembee.config.calibration.mlp_classifier.MLPClassifierAlgorithm(hidden_layer_sizes=(100,), activation='relu', *, solver='adam', alpha=0.0001, batch_size='auto', learning_rate='constant', learning_rate_init=0.001, power_t=0.5, max_iter=200, shuffle=True, random_state=None, tol=0.0001, verbose=False, warm_start=False, momentum=0.9, nesterovs_momentum=True, early_stopping=False, validation_fraction=0.1, beta_1=0.9, beta_2=0.999, epsilon=1e-08, n_iter_no_change=10, max_fun=15000)[source]
Bases:
MLPClassifier
- hyperparameters = [{'alpha': [0.0001, 5e-05, 1e-05, 1e-07], 'learning_rate': ['constant', 'inv_scaling', 'adaptive'], 'early_stopping': [True, False]}]
- name = 'mlp'
chembee.config.calibration.naive_bayes module
chembee.config.calibration.random_forest module
- class chembee.config.calibration.random_forest.RandomForestClassifierAlgorithm(n_estimators=100, *, criterion='gini', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='sqrt', max_leaf_nodes=None, min_impurity_decrease=0.0, bootstrap=True, oob_score=False, n_jobs=None, random_state=None, verbose=0, warm_start=False, class_weight=None, ccp_alpha=0.0, max_samples=None)[source]
Bases:
RandomForestClassifier
- hyperparameters = [{'n_estimators': [100, 70, 60, 40, 20, 10], 'max_depth': [None, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]}]
- name = 'rfc'
chembee.config.calibration.restricted_bm module
chembee.config.calibration.spectral_clustering module
- class chembee.config.calibration.spectral_clustering.NaivlyCalibratedSpectralClustering(n_clusters=8, *, eigen_solver=None, n_components=None, random_state=None, n_init=10, gamma=1.0, affinity='rbf', n_neighbors=10, eigen_tol=0.0, assign_labels='kmeans', degree=3, coef0=1, kernel_params=None, n_jobs=None, verbose=False)[source]
Bases:
SpectralClustering
- fit(X, y)[source]
Perform spectral clustering from features, or affinity matrix.
- X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples, n_samples)
Training instances to cluster, similarities / affinities between instances if
affinity='precomputed'
, or distances between instances ifaffinity='precomputed_nearest_neighbors
. If a sparse matrix is provided in a format other thancsr_matrix
,csc_matrix
, orcoo_matrix
, it will be converted into a sparsecsr_matrix
.- yIgnored
Not used, present here for API consistency by convention.
- selfobject
A fitted instance of the estimator.
- name = 'spc'
chembee.config.calibration.svc module
- class chembee.config.calibration.svc.NaivelyCalibratedLinearSVC(penalty='l2', loss='squared_hinge', *, dual=True, tol=0.0001, C=1.0, multi_class='ovr', fit_intercept=True, intercept_scaling=1, class_weight=None, verbose=0, random_state=None, max_iter=1000)[source]
Bases:
LinearSVC
LinearSVC with predict_proba method that naively scales decision_function output.
- fit(X, y)[source]
Fit the model according to the given training data.
- X{array-like, sparse matrix} of shape (n_samples, n_features)
Training vector, where n_samples is the number of samples and n_features is the number of features.
- yarray-like of shape (n_samples,)
Target vector relative to X.
- sample_weightarray-like of shape (n_samples,), default=None
Array of weights that are assigned to individual samples. If not provided, then each sample is given unit weight.
New in version 0.18.
- selfobject
An instance of the estimator.
- name = 'lscv'
- class chembee.config.calibration.svc.NaivelyCalibratedSVC(*, C=1.0, kernel='rbf', degree=3, gamma='scale', coef0=0.0, shrinking=True, probability=False, tol=0.001, cache_size=200, class_weight=None, verbose=False, max_iter=-1, decision_function_shape='ovr', break_ties=False, random_state=None)[source]
Bases:
SVC
LinearSVC with predict_proba method that naively scales decision_function output.
- fit(X, y)[source]
Fit the SVM model according to the given training data.
- X{array-like, sparse matrix} of shape (n_samples, n_features) or (n_samples, n_samples)
Training vectors, where n_samples is the number of samples and n_features is the number of features. For kernel=”precomputed”, the expected shape of X is (n_samples, n_samples).
- yarray-like of shape (n_samples,)
Target values (class labels in classification, real numbers in regression).
- sample_weightarray-like of shape (n_samples,), default=None
Per-sample weights. Rescale C per sample. Higher weights force the classifier to put more emphasis on these points.
- selfobject
Fitted estimator.
If X and y are not C-ordered and contiguous arrays of np.float64 and X is not a scipy.sparse.csr_matrix, X and/or y may be copied.
If X is a dense array, then the other methods will not support sparse matrices as input.
- hyperparameters = [{'kernel': ['rbf'], 'gamma': ['scale', 'auto']}]
- name = 'svc'