jaccard

package module
v0.0.0-...-861997f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2016 License: MIT Imports: 1 Imported by: 0

README

jaccard

Build Status Coverage Status GoReport GoDoc License

Package jaccard provides calcuration of jaccard index.
CalcurateBySlices is about 5 times faster than using set

Installation

go get github.com/Iwark/jaccard

Example

package main

import (
  "fmt"
  "github.com/Iwark/jaccard"
)

func main() {
  s1 := []interface{}{1, 2, 3, 4}
  s2 := []interface{}{1, 3, 5, 7}

  d := jaccard.CalcurateBySlices(s1, s2)
  fmt.Println("jaccard index: ", d)
}

License

jaccard is released under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcurateBySets

func CalcurateBySets(s1, s2 mapset.Set) float32

CalcurateBySets calcurate the jaccard score

func CalcurateBySlices

func CalcurateBySlices(s1, s2 []int) float32

CalcurateBySlices calcurate the jaccard score

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL