interpolateMissing

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

README

interpolateMissing

Fill in missing values

Overview

Description

Select a numerical column list and convert it into bins.

Implementation details
Input
    data - [array, map] data to be filled in
    col - [int, string, array] the column(s) to be filled in
Params
    how - [string] mean: substitutes mean of included values for Missing, linear: interpolates linearly from adjacent values
        Optional - True
        Default- "mean"
        allowed: ["mean","linear"]
    edges - [string] for linear how to handle edges
        Optional - True
        allowed: ["linear"]
OutputType - [array, map]

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"`
	Col  interface{} `md:"col"`
}

func (*Input) FromMap

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

type InterpolateMethod

type InterpolateMethod interface {
	Process(series []interface{}, gap *Interval)
	ProcessEdge(series []interface{}, gap *Interval)
}

type Interval

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

func NewInterval

func NewInterval() Interval

func (*Interval) GetEndBound

func (i *Interval) GetEndBound() int

func (*Interval) GetStartBound

func (i *Interval) GetStartBound() int

func (*Interval) Interpolate

func (i *Interval) Interpolate(series []interface{}, how InterpolateMethod)

func (*Interval) InterpolateEdge

func (i *Interval) InterpolateEdge(series []interface{}, how InterpolateMethod)

func (*Interval) SetEndBound

func (i *Interval) SetEndBound(endBound int)

func (*Interval) SetStartBound

func (i *Interval) SetStartBound(startBound int)

type Linear

type Linear struct {
}

func (Linear) Process

func (l Linear) Process(series []interface{}, gap *Interval)

func (Linear) ProcessEdge

func (l Linear) ProcessEdge(series []interface{}, gap *Interval)

type Mean

type Mean struct {
}

func (Mean) Process

func (m Mean) Process(series []interface{}, gap *Interval)

func (Mean) ProcessEdge

func (m Mean) ProcessEdge(series []interface{}, gap *Interval)

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 {
	How   string `md:"how"`
	Edges string `md:"edges"`
}

Jump to

Keyboard shortcuts

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