def points(self): if self._X is None: self._X = ravdb.get_ops_by_name(op_name="X_train", graph_id=self.id)[0] if self._X.status == "computed": return self._X.output else: raise Exception("Need to complete the prediction first")
def coefficients(self): if self._coefficients is None: self._coefficients = ravdb.get_ops_by_name(op_name="coefficients", graph_id=self.id)[0] print(self._coefficients.id) if self._coefficients.status == "computed": return self._coefficients.output else: raise Exception("Need to train the model first")
def labels(self): if self._labels is None: self._labels = ravdb.get_ops_by_name(op_name="label", graph_id=self.id)[0] print(self._labels.id) if self._labels.status == "computed": return self._labels.output else: raise Exception("Need to complete the prediction first")
def get_ops_by_name(op_name, graph_id=None): ops = ravdb.get_ops_by_name(op_name=op_name, graph_id=graph_id) return [Op(id=op.id) for op in ops]