oneHotEncoding

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

README

oneHotEncoding

Overview

Description

Convert categorical vector into a set of vectors for each category with a 0/1. The rest of the data in the map/matrix is kept but column used is removed unless keepOrig is true. Collisions of column names are resolved, but append an intger after an "_" starting at 1 for the new column, for example "col_1", "col_2", "col_3", ...

Implementation details

Compliance to Spec

Rough level of compliance

%100

Deviations from Specification

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Input

type Input struct {
	Data interface{} `md:"data"`
}

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

type Operation

type Operation struct {
	// contains filtered or unexported fields
}

func (*Operation) Eval

func (a *Operation) Eval(inputs map[string]interface{}) (interface{}, error)

type Params

type Params struct {
	InputColumns  []interface{} `md:"inputColumns"`
	OutputColumns []interface{} `md:"outputColumns",required=false`
	KeepOrig      bool          `md:"keepOrig"`
}

Jump to

Keyboard shortcuts

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