binning

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: 9 Imported by: 0

README

binning

Overview

Description

Select a numerical column list and convert it into bins.

Implementation details

Input Data - map[string]interface{} or [][]interface{} Optional = False Params Quantile - int : number of bin by even quantiles Default = 0 Optional = True Bins - []float64 : array of bin boundaries by data value Optional = True Labels - []string : used as labels for the resulting bins Optional = True Column - string : target column for binning Optional = True Retbins - bool : Whether to return the (bins, labels) or not Default = False Optional = True Precision - int : precision of bin boundaries Optional = True Duplicates - string : action on duplicate data raise error (still output data) or drop data Allowed = ["raise", "drop"] Default = "raise" Optional = True

OutputType - map[string]interface{}

Compliance to Spec

Rough level of compliance

100%

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 {
	Quantile   int       `md:"quantile"`
	Bins       []float64 `md:"bins"`
	Labels     []string  `md:"labels"`
	Column     string    `md:"column"`
	Retbins    bool      `md:"retbins"`
	Precision  int       `md:"precision"`
	Duplicates string    `md:"duplicates"`
}

Jump to

Keyboard shortcuts

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