src.models package

Submodules

src.models.model module

class src.models.model.Model(clf)[source]

Bases: object

Class represents the model used in classification

build_pipeline()[source]

Method builds the pipeline with TfidfVectorizer and chosen classifier.

count_accuracy()[source]

Method returns the accuracy of the model.

get_X()[source]

Method returns the X data.

get_X_test()[source]

Method returns the X test data.

get_X_train()[source]

Method returns the X training data.

get_clf()[source]

Method returns the classifier.

get_pipeline()[source]

Method returns the pipeline.

get_random_state()[source]

Method returns the random state.

get_test_size()[source]

Method returns the test size.

get_y()[source]

Method returns the y data.

get_y_pred()[source]

Method returns the y_pred.

get_y_test()[source]

Method returns the y test data.

get_y_train()[source]

Method returns the y training data.

set_X(X)[source]

Method sets the X data.

set_X_test(X_test)[source]

Method sets the X test data.

set_X_train(X_train)[source]

Method sets the X training data.

set_clf(clf)[source]

Method sets the classifier.

set_random_state(random_state)[source]

Method sets the random state.

set_test_size(test_size)[source]

Method sets the test size.

set_y(y)[source]

Method sets the y data.

set_y_pred(y_pred)[source]

Method sets the y_pred.

set_y_test(y_test)[source]

Method sets the y test data.

set_y_train(y_train)[source]

Method sets the y training data.

train()[source]

Method trains the model.

Module contents