         return data.filter { seen.updateValue(true, forKey: $0) == nil }
     }
     
-    static func unique(data: [Datum]) -> [Datum] {
+    static func uniqueClassifications(data: [Datum]) -> [String] {
         var seen = [String: Bool]()
-        return data.filter { seen.updateValue(true, forKey: $0.classification) == nil }
-    }
-    
-    static func uniqueFeatures(data: [Datum], featureIndex: Int) -> [Feature] {
-        let features = data.map { $0.features[featureIndex] }
-        return unique(features)
+        return data
+            .filter { seen.updateValue(true, forKey: $0.classification) == nil }
+            .map { $0.classification }
     }
     
     static func split(data: [Datum], featureIndex: Int, cut: Feature) -> ([Datum], [Datum]) {

        return (left, right)
    }
    
    static func probability(datum: Datum, _ data: [Datum]) -> Double {
        var count = 0
        for curData in data {
            if curData.classification == datum.classification { count++ }
        }
        return Double(count) / Double(data.count)
    }
    
    static func entropy(data: [Datum]) -> Double {
        let uniqueData = unique(data)
        var sum = 0.0
        for datum in uniqueData {
            let p = probability(datum, data)
            sum += -p * log2(p)
        }
        return sum

    if lhs.isNumeric != rhs.isNumeric { return false }
    return lhs.isNumeric ? lhs.number == rhs.number : lhs.category == rhs.category
}
