(self, X, complete_fps=True)
return sampled_points, sampled_points_idx
Sample points from input data.
Sample points from input data.
Sample points from input data .
def get_sample(self, X, complete_fps=True):
        """Sample points from input data."""
        projected_points, nn_idx = self.sess.run(
            (self.s, self.idx), feed_dict={self.x: X}
        )

        # note: for hard projection, np.array_equal(projected_points[i], X[i][nn_idx[i]]) is True

        if complete_fps:
            (
                sampled_points,
                sampled_points_idx,
                n_unique_points,
            ) = self.simple_projection_and_continued_fps(X, projected_points, nn_idx)
        else:
            sampled_points = projected_points
            sampled_points_idx = nn_idx
            n_unique_points = -1.0

        return sampled_points, sampled_points_idx
def get_sample ( self , X , complete_fps = True ) : projected_points , nn_idx = self . sess . run ( ( self . s , self . idx ) , feed_dict = { self . x : X } ) # note: for hard projection, np.array_equal(projected_points[i], X[i][nn_idx[i]]) is True if complete_fps : ( sampled_points , sampled_points_idx , n_unique_points , ) = self . simple_projection_and_continued_fps ( X , projected_points , nn_idx ) else : sampled_points = projected_points sampled_points_idx = nn_idx n_unique_points = - 1.0 return sampled_points , sampled_points_idx