model_eval¶
This module contains code for saving, loading, and evaluating pre-trained models.
Functions
load_model(model_path) |
It loads a pre-trained TSVM-based estimator. |
save_model(validator, params, output_file) |
It saves an estimator with specified hyper-parameters and a evaluation method. |
Classes
ModelThread(usr_in) |
Evaluates a pre-trained model in a thread. |
-
model_eval.save_model(validator, params, output_file)[source]¶ It saves an estimator with specified hyper-parameters and a evaluation method.
Parameters: validator : object
An evaluation method.
params : dict
Hyper-parameters of the estimator.
output_file : str
The full path and filename of the saved model.
-
model_eval.load_model(model_path)[source]¶ It loads a pre-trained TSVM-based estimator.
Parameters: model_path : str
The path at which the model is stored.
Returns: object
A pre-trained estimator.
dict
Model information.
-
class
model_eval.ModelThread(usr_in)[source]¶ Bases:
PyQt5.QtCore.QObjectEvaluates a pre-trained model in a thread.
Parameters: usr_input : object
An instance of
UserInputclass which holds the user input.Methods
blockSignals(self, bool)childEvent(self, QChildEvent)children(self)connectNotify(self, QMetaMethod)customEvent(self, QEvent)deleteLater(self)destroyeddestroyed(self, object: QObject = None) [signal] disconnect(QMetaObject.Connection)disconnectNotify(self, QMetaMethod)dumpObjectInfo(self)dumpObjectTree(self)dynamicPropertyNames(self)eval_model()It evaluates a pre-trained model on test samples. event(self, QEvent)eventFilter(self, QObject, QEvent)findChild(self, type, name, options, …)findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren(self, type, name, options, …)findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] inherits(self, str)installEventFilter(self, QObject)isSignalConnected(self, QMetaMethod)isWidgetType(self)isWindowType(self)killTimer(self, int)metaObject(self)moveToThread(self, QThread)objectName(self)objectNameChangedobjectNameChanged(self, str) [signal] parent(self)property(self, str)pyqtConfigure(…)Each keyword argument is either the name of a Qt property or a Qt signal. receivers(self, PYQT_SIGNAL)removeEventFilter(self, QObject)sender(self)senderSignalIndex(self)setObjectName(self, str)setParent(self, QObject)setProperty(self, str, Any)sig_update_model_evalsignalsBlocked(self)startTimer(self, int, timerType)thread(self)timerEvent(self, QTimerEvent)tr(self, str, disambiguation, n)