lib/rumale/clustering/single_linkage.rb in rumale-0.18.1 vs lib/rumale/clustering/single_linkage.rb in rumale-0.18.2
- old
+ new
@@ -68,26 +68,9 @@
raise ArgumentError, 'Expect the input distance matrix to be square.' if @params[:metric] == 'precomputed' && x.shape[0] != x.shape[1]
distance_mat = @params[:metric] == 'precomputed' ? x : Rumale::PairwiseMetric.euclidean_distance(x)
@labels = partial_fit(distance_mat)
end
- # Dump marshal data.
- # @return [Hash] The marshal data.
- def marshal_dump
- { params: @params,
- labels: @labels,
- hierarchy: @hierarchy }
- end
-
- # Load marshal data.
- # @return [nil]
- def marshal_load(obj)
- @params = obj[:params]
- @labels = obj[:labels]
- @hierarchy = obj[:hierarchy]
- nil
- end
-
private
# @!visibility private
class UnionFind
def initialize(n)