assets

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright (C) 2019-2020 Vdaas.org Vald team ( kpango, rinx, kmrmt )

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2019-2020 Vdaas.org Vald team ( kpango, rinx, kmrmt )

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandomIDs

func CreateRandomIDs(n int) (ids []string)

CreateRandomIDs generates random string IDs.

func CreateRandomIDsWithLength

func CreateRandomIDsWithLength(n, l int) (ids []string)

CreateRandomIDsWithLength generates random string IDs that have specified length.

func CreateSerialIDs

func CreateSerialIDs(n int) []string

CreateSerialIDs generates serial number IDs.

func Data

func Data(name string) func() (Dataset, error)

Data loads specified dataset and returns it.

func Load

func Load(path string) (train, test, distances [][]float32, neighbors [][]int, dim int, err error)

Load returns loaded vectors and so on from approximate nearest neighbor benchmark dataset.

Types

type Dataset

type Dataset interface {
	Train() [][]float32
	TrainAsFloat64() [][]float64
	Query() [][]float32
	QueryAsFloat64() [][]float64
	Distances() [][]float32
	DistancesAsFloat64() [][]float64
	Neighbors() [][]int
	IDs() []string
	Name() string
	Dimension() int
	DistanceType() string
	ObjectType() string
}

Dataset is representation of train and test dataset.

func LoadDataWithRandomIDs

func LoadDataWithRandomIDs(path string) (Dataset, error)

LoadDataWithRandomIDs returns approximate nearest neighbor benchmark dataset with random IDs.

func LoadDataWithSerialIDs

func LoadDataWithSerialIDs(path string) (Dataset, error)

LoadDataWithSerialIDs returns approximate nearest neighbor benchmark dataset with serial IDs.

Jump to

Keyboard shortcuts

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