genui.models.genuimodels package

Submodules

genui.models.genuimodels.algorithms module

algorithms

Created by: Martin Sicho On: 24-01-20, 15:03

class genui.models.genuimodels.algorithms.RandomForest(builder, callback=None)[source]

Bases: Algorithm

fit(X: DataFrame, y: Series)[source]
property model
name = 'RandomForest'
parameters = {'n_estimators': {'defaultValue': 100, 'type': 'integer'}}
predict(X: DataFrame)[source]

genui.models.genuimodels.bases module

bases

Created by: Martin Sicho On: 24-01-20, 15:03

class genui.models.genuimodels.bases.Algorithm(builder, callback=None)[source]

Bases: ABC

CLASSIFICATION = 'classification'
GENERATOR = 'generator'
MAP = 'map'
REGRESSION = 'regression'
classmethod attachModesToModel(model, modes)[source]
static attachToInstance(instance, items, field)[source]
property builder
deserialize(filename)[source]
django_file_formats = []
django_model = None
django_modes = []
django_parameters = []
abstract fit(X: DataFrame, y: Series)[source]
getDeserializer()[source]
classmethod getDjangoModel(corePackage=None, update=False) Algorithm[source]
classmethod getFileFormats(attach_to=None)[source]
classmethod getModes()[source]
classmethod getParams()[source]
getSerializer()[source]
abstract property model
name = None
parameters = {}
abstract predict(X: DataFrame) Series[source]
serialize(filename)[source]
class genui.models.genuimodels.bases.CompleteBuilder(instance, progress, *args, **kwargs)[source]

Bases: PredictionMixIn, ValidationMixIn, ProgressMixIn, ModelBuilder, ABC

class genui.models.genuimodels.bases.ModelBuilder(instance: Model, progress=None, onFit=None)[source]

Bases: ABC

build() Model[source]
property corePackage
findAlgorithmClass(name, corePackage=None)[source]
findMetricClass(name, corePackage=None)[source]
classmethod getDjangoModel(corePackage=None, update=False)[source]
abstract getX() DataFrame[source]
abstract getY() Series[source]
property model: Algorithm
saveFile()[source]
class genui.models.genuimodels.bases.PredictionMixIn[source]

Bases: object

predict(X: Optional[DataFrame] = None) Series[source]
class genui.models.genuimodels.bases.ProgressMixIn(instance, progress, *args, **kwargs)[source]

Bases: object

recordProgress()[source]
class genui.models.genuimodels.bases.ValidationMetric(builder)[source]

Bases: ABC

description = None
classmethod getDjangoModel(corePackage=None, update=False)[source]
name = None
static probasToClasses(probas)[source]
save(true_vals: ~pandas.core.series.Series, predicted_vals: ~pandas.core.series.Series, perfClass=<class 'genui.models.models.ModelPerformance'>, **kwargs)[source]
class genui.models.genuimodels.bases.ValidationMixIn[source]

Bases: object

fitAndValidate(X_train: ~pandas.core.frame.DataFrame, y_train: ~pandas.core.series.Series, X_validated: ~pandas.core.frame.DataFrame, y_validated: ~pandas.core.series.Series, y_predicted=None, perfClass=<class 'genui.models.models.ModelPerformance'>, *args, **kwargs)[source]
validate(y_validated, y_predicted, perfClass=<class 'genui.models.models.ModelPerformance'>, *args, **kwargs)[source]

genui.models.genuimodels.builders module

builders

Created by: Martin Sicho On: 24-01-20, 15:03

genui.models.genuimodels.metrics module

metrics

Created by: Martin Sicho On: 24-01-20, 15:04

class genui.models.genuimodels.metrics.MCC(builder)[source]

Bases: ValidationMetric

description = "Matthew's Correlation Coefficient"
modes = ['classification']
name = 'MCC'
class genui.models.genuimodels.metrics.MSE(builder)[source]

Bases: ValidationMetric

description = 'Mean squared error regression loss. As implemented in scikit-learn: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.mean_squared_error.html#sklearn.metrics.mean_squared_error.'
modes = ['regression']
name = 'MSE'
class genui.models.genuimodels.metrics.R2(builder)[source]

Bases: ValidationMetric

description = 'R^2 (coefficient of determination) regression score function. As implemented in scikit-learn: https://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html#sklearn.metrics.r2_score.'
modes = ['regression']
name = 'R2'
class genui.models.genuimodels.metrics.ROC(builder)[source]

Bases: ValidationMetric

description = 'The area under ROC curve.'
getCurve(true_vals, scores)[source]
modes = ['classification']
name = 'ROC'
save(true_vals: ~pandas.core.series.Series, predicted_vals: ~pandas.core.series.Series, perfClass=<class 'genui.models.models.ModelPerformance'>, **kwargs)[source]

Module contents

__init__.py

Created by: Martin Sicho On: 24-01-20, 14:54