Versions in this module Expand all Collapse all v0 v0.4.0 May 24, 2024 Changes in this version + func Camberra(x, y map[string]float64) float64 + func Chebyshev(x, y map[string]float64) float64 + func ComputeDistance(name string, x, y map[string]float64) float64 + func Cosine(x, y map[string]float64) float64 + func CountValues(sensitives []string) map[string]int + func Euclidean(x, y map[string]float64) float64 + func Find(slice []string, val string) bool + func IsUnique(sensitives map[string][]interface{}) map[string]bool + func ListValues(data []map[string]interface{}, s []string) (mapValues map[string][]interface{}) + func Manhattan(x, y map[string]float64) float64 + func MapItoMapF(m map[string]interface{}) map[string]float64 + func Minkowski(x, y map[string]float64, p float64) float64 + func Scale(value interface{}, mean float64, std float64) float64 + func Similarity(distance float64) float64 + func SliceString(slice []interface{}) (res []string) + func SliceToFloat64(slice []interface{}) (res []float64) + func TopSimilarity(s map[float64]interface{}) (float64, interface{}) + func Unique(slice []map[string]interface{}, qi []string) bool type GeneralAnonymizer + func (a GeneralAnonymizer) ComputeGeneralization(clus Cluster, qi []string) + type Reidentification struct + func NewReidentification(args []string) Reidentification + func (r Reidentification) Anonymize(rec Record, clus Cluster, qi, s []string) Record + func (r Reidentification) ComputeSimilarity(rec Record, clus Cluster, qi []string, s []string) map[float64]interface{} + func (r Reidentification) ComputeStatistics(data []map[string]interface{}, clus Cluster, s []string) + func (r Reidentification) InitReidentification(clus Cluster, qi []string, s []string) + func (r Reidentification) Statistics(idCluster string, q string) (mean float64, std float64) v0.3.0 May 9, 2022 Changes in this version + func Contains(slice []string, str string) bool + func Exist(filename string) bool + func RandInt(max int64) (int, error) + func Shuffle(s []float64) []float64 + type Definition struct + Aggregation string + K int + L int + Rules []Rules + Sensitive []string + Version string + func LoadConfigurationFromYAML(filename string) (Definition, error) + type Rules struct + Name string + type SwapAnonymizer struct + func NewSwapAnonymizer() SwapAnonymizer + func (a SwapAnonymizer) Anonymize(rec Record, clus Cluster, qi, s []string) Record + func (a SwapAnonymizer) Swap(clus Cluster, qi []string) v0.2.0 Apr 6, 2022 Changes in this version + func BoxMuller() (float64, float64) + func Max(listValues []float64) float64 + func Min(listValues []float64) float64 + func NewNode(tree *KDTree, path string, rot int) node + func RandFloat() (float64, error) + func Rescaling(value float64, listValues []float64, method string) (rescale float64) + func Scaling(value float64, listValues []float64, method string) float64 type KDTree + func NewKDTree(k, l, dim int, clusterID map[string]int) KDTree v0.1.1 Mar 30, 2022 Changes in this version type AggregationAnonymizer + func (a AggregationAnonymizer) ComputeAggregation(clus Cluster, qi []string) v0.1.0 Jan 25, 2022 Changes in this version + func Anonymize(source RecordSource, factory GeneralizerFactory, k int, l int, dim int, ...) error + func ExpNumber(mean float64) float64 + func GaussianNumber(loc float64, scale float64) float64 + func IQR(values []float64) float64 + func LaplaceNumber() float64 + func Mean(listValues []float64) (m float64) + func Median(listValues []float64) (m float64) + func Std(listValues []float64) (s float64) + func Sum(listValues []float64) (sum float64) + type AggregationAnonymizer struct + func NewAggregationAnonymizer(typeAgg string) AggregationAnonymizer + func (a AggregationAnonymizer) Anonymize(rec Record, clus Cluster, qi, s []string) Record + type AnonymizedRecord struct + func (ar AnonymizedRecord) QuasiIdentifer() []float32 + func (ar AnonymizedRecord) Row() map[string]interface{} + func (ar AnonymizedRecord) Sensitives() []interface{} + type Anonymizer interface + Anonymize func(Record, Cluster, []string, []string) Record + type Cluster interface + Bounds func() []bounds + ID func() string + Records func() []Record + type CodingAnonymizer struct + func NewCodingAnonymizer() CodingAnonymizer + func (a CodingAnonymizer) Anonymize(rec Record, clus Cluster, qi, s []string) Record + type Debugger interface + Information func(Record, Cluster) Record + func NewNoDebugger() Debugger + type GeneralAnonymizer struct + func NewGeneralAnonymizer() GeneralAnonymizer + func (a GeneralAnonymizer) Anonymize(rec Record, clus Cluster, qi, s []string) Record + type Generalizer interface + Add func(Record) + Build func() + Clusters func() []Cluster + String func() string + type GeneralizerFactory interface + New func(k int, l int, dim int) Generalizer + type InfosRecord struct + func (ir InfosRecord) QuasiIdentifer() []float32 + func (ir InfosRecord) Row() map[string]interface{} + func (ir InfosRecord) Sensitives() []interface{} + type KDTree struct + func (t KDTree) Add(r Record) + func (t KDTree) Build() + func (t KDTree) Clusters() []Cluster + func (t KDTree) String() string + type KDTreeFactory struct + func NewKDTreeFactory() KDTreeFactory + func (f KDTreeFactory) New(k int, l int, dim int) Generalizer + type NoAnonymizer struct + func NewNoAnonymizer() NoAnonymizer + func (a NoAnonymizer) Anonymize(rec Record, clus Cluster, qi, s []string) Record + type NoDebugger struct + func (d NoDebugger) Information(rec Record, cluster Cluster) Record + type NoiseAnonymizer struct + func NewNoiseAnonymizer(mechanism string) NoiseAnonymizer + func (a NoiseAnonymizer) Anonymize(rec Record, clus Cluster, qi, s []string) Record + type Quartiles struct + Q1 float64 + Q2 float64 + Q3 float64 + func Quartile(values []float64) Quartiles + type Record interface + QuasiIdentifer func() []float32 + Row func() map[string]interface{} + Sensitives func() []interface{} + type RecordSink interface + Collect func(Record) error + type RecordSource interface + Err func() error + Next func() bool + QuasiIdentifer func() []string + Sensitive func() []string + Value func() Record + type SequenceDebugger struct + func NewSequenceDebugger(key string) SequenceDebugger + func (d SequenceDebugger) Information(rec Record, cluster Cluster) Record