ClusteringMetrics.fromJson constructor

ClusteringMetrics.fromJson(
  1. Map json_
)

Implementation

ClusteringMetrics.fromJson(core.Map json_)
    : this(
        clusters: json_.containsKey('clusters')
            ? (json_['clusters'] as core.List)
                .map((value) => Cluster.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        daviesBouldinIndex: json_.containsKey('daviesBouldinIndex')
            ? (json_['daviesBouldinIndex'] as core.num).toDouble()
            : null,
        meanSquaredDistance: json_.containsKey('meanSquaredDistance')
            ? (json_['meanSquaredDistance'] as core.num).toDouble()
            : null,
      );