Compocyte.core.models.fit_methods¶
Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Simplified from keras to avoid dependency and premature conversion to a Tensor. |
Classes
|
- Compocyte.core.models.fit_methods.to_categorical(y, num_classes, dtype='float32')[source]¶
Simplified from keras to avoid dependency and premature conversion to a Tensor.
- Compocyte.core.models.fit_methods.predict(model, x, threshold=-1, monte_carlo=None)[source]¶
- Parameters:
monte_carlo (int)
- Compocyte.core.models.fit_methods.fit_torch(model, x, y, epochs=40, batch_size=64, starting_lr=0.01, max_lr=0.1, momentum=0.5, parallelize=True, num_threads=1, beta=0.8, gamma=2.0, class_balance=True, max_cells=1000000)[source]¶
- Compocyte.core.models.fit_methods.fit_logreg(model, x, y, **fit_kwargs)[source]¶
- Parameters:
model (LogisticRegression)
- Compocyte.core.models.fit_methods.fit_trees(model, x, y, **fit_kwargs)[source]¶
- Parameters:
model (BoostedTrees)
- Compocyte.core.models.fit_methods.fit(model, x, y, standardize_idx=None, **fit_kwargs)[source]¶
- Parameters:
model (Union[DenseTorch, LogisticRegression, DummyClassifier]) – Model to be fitted.
x (np.array) – Input data.
y (np.array) – Target data in the shape of a 1-dimensional array of label strings.
standardize_idx (list)
- Returns:
_description_
- Return type:
_type_