Feature
public class Feature : HashableUndocumented
- 
                  
                  Feature Name DeclarationSwift public var name: String
- 
                  
                  Possible values for the feature DeclarationSwift public var values: Set<FeatureValue>
- 
                  
                  entropy of dataset if feature is chosen to grow tree DeclarationSwift public var entropy: Float?
- 
                  
                  gini impurity of dataset if feature is chosen to grow tree DeclarationSwift public var giniImpurity: Float?
- 
                  
                  Initializer for Feature DeclarationSwift public init(data: [[String]], column: Int)Parametersdata2D string of data columncolumn number of feature Return ValueFeature 
- 
                  
                  Returns most occuring featureValue DeclarationSwift public func getDominantValue() -> FeatureValueReturn ValueFeatureValue 
- 
                  
                  Returns standard deviation of continous target variable DeclarationSwift public func getTargetStdDev(data: [[String]], target: Int) -> FloatParametersdatastring array of data targetcol num of target var Return Valuestandard deviation of target variable as Float 
- 
                  
                  Computes info gain values for categorical feature/feature values DeclarationSwift public func getInfoGainCategorical(data: [[String]], target: Int) -> (Float, Float)Parametersdatastring array of data targetcol num of target var Return Value- infoGain: from choosing the feature as float
- featureEntropy: entropy of the feature as float
 
- 
                  
                  Computes info gain values for numerical feature/feature values DeclarationParametersdatastring array of data targetcol num of target var Return Value- entropy: entropy of the feature
- dataset1: dataset split part 1
- dataset2: dataset split part 2
- cutoff: for the dataset split
 
- 
                  
                  Computes gini impurity values for categorical feature/feature values DeclarationSwift public func getGiniImpurityCategorical(data: [[String]], target: Int) -> FloatParametersdatastring array of data targetcol num of target var Return Valuegini impurity of choosing feature as float 
- 
                  
                  Computes gini impurity values for numerical feature/feature values DeclarationParametersdatastring array of data targetcol num of target var Return Value- giniImpurity: gini impurity of the feature
- dataset1: dataset split part 1
- dataset2: dataset split part 2
- cutoff: for the dataset split
 
- 
                  
                  Required == func for implementing Hashable DeclarationSwift public static func == (lhs: Feature, rhs: Feature) -> BoolParameterslhsfeature on the left rhsfeature on the right Return Valuetrue if feature names is same else false 
- 
                  
                  Empty required hash func for implementing Hashable DeclarationSwift public func hash(into hasher: inout Hasher)
 Feature Class Reference
      Feature Class Reference