raise NotFittedError("This PHATE instance is not fitted yet. Call "
""fit" with appropriate arguments before "
"using this method.")
elif self.X is not None and X is not None and not np.all(X == self.X):
sklearn.BaseEstimator assumes out-of-sample transformations are
possible. We explicitly test for this in case the user is not aware
After Change
raise NotFittedError("This PHATE instance is not fitted yet. Call "
""fit" with appropriate arguments before "
"using this method.")
elif X is not None and not np.all(X == self.X):
// fit to external data
if isinstance(self.graph, graphtools.TraditionalGraph):
raise ValueError("Cannot transform additional data using a "
"precomputed distance matrix.")
else:
transitions = self.graph.extend_to_data(X)
return self.graph.interpolate(self.embedding,
transitions)
else:
if self.t == "auto":
t = self.optimal_t(t_max=t_max, plot=plot_optimal_t, ax=ax)
print("Automatically selected t = {}".format(t))