Documentation ¶
Index ¶
- func Apply(dataset []DataPoint, f func([]float64) []float64)
- func Categorize(entries []FrameEntry) (newColumn []FrameEntry, options []FrameEntry)
- func FromOneHot(output []float64) int
- func GetInputs(dataset []DataPoint) (inputs [][]float64)
- func GetMean(dataset []DataPoint, sampleSize int) []float64
- func GetOutputs(dataset []DataPoint) (outputs [][]float64)
- func IsCorrect(output []float64, target []float64)
- func NormalizeInputs(dataset []DataPoint)
- func SaveDataset(dataset []DataPoint, dir string, name string)
- func Split(dataset []DataPoint) (inputs [][]float64, outputs [][]float64)
- func ToOneHot(value int, maxValue int) []float64
- type DataFrame
- func (frame *DataFrame) AddColumn(header string, values []float64)
- func (frame *DataFrame) CategorizeColumn(title string) (options []FrameEntry)
- func (frame *DataFrame) CategorizeColumnSlice(colSlice string) (options [][]FrameEntry)
- func (frame *DataFrame) CategorizeNthColumn(col int) (options []FrameEntry)
- func (frame *DataFrame) ClampColumn(title string, newMin float64, newMax float64) (float64, float64)
- func (frame *DataFrame) ClampColumnSlice(colSlice string, newMin float64, newMax float64) (mins []float64, maxes []float64)
- func (frame *DataFrame) ClampNthColumn(col int, newMin float64, newMax float64) (float64, float64)
- func (frame *DataFrame) Cols() int
- func (frame *DataFrame) DeleteColumnSlice(sliceString string)
- func (frame *DataFrame) DeleteColumns(headers ...string)
- func (frame *DataFrame) DeleteRows(sliceString string)
- func (frame *DataFrame) Dims() (int, int)
- func (frame *DataFrame) GetCol(title string) []FrameEntry
- func (frame *DataFrame) GetNthCol(col int) []FrameEntry
- func (frame *DataFrame) MapFloatColumn(title string, lambda func(int, float64) float64)
- func (frame *DataFrame) MapFloatColumnSlice(colSlice string, lambda func(int, float64) float64)
- func (frame *DataFrame) MapNthFloatColumn(col int, lambda func(int, float64) float64)
- func (frame *DataFrame) MapNthStringColumn(col int, lambda func(string) string)
- func (frame *DataFrame) MapStringColumn(title string, lambda func(string) string)
- func (frame *DataFrame) MapStringColumnSlice(colSlice string, lambda func(string) string)
- func (frame *DataFrame) NormalizeColumn(title string) (float64, float64)
- func (frame *DataFrame) NormalizeColumnSlice(colSlice string) (means []float64, stddevs []float64)
- func (frame *DataFrame) NormalizeNthColumn(col int) (float64, float64)
- func (frame *DataFrame) NumericallyCategorizeColumn(title string)
- func (frame *DataFrame) NumericallyCategorizeColumnSlice(colSlice string)
- func (frame *DataFrame) NumericallyCategorizeNthColumn(col int)
- func (frame *DataFrame) OverwriteColumn(newColumn []FrameEntry, title string)
- func (frame *DataFrame) OverwriteNthColumn(newColumn []FrameEntry, col int)
- func (frame *DataFrame) PrintSummary()
- func (frame *DataFrame) Rows() int
- func (frame *DataFrame) SelectColumns(sliceString string) (selectedFrame DataFrame)
- func (frame *DataFrame) SelectRowSlice(sliceString string) (selectedFrame DataFrame)
- func (frame *DataFrame) SelectRowsMatching(header string, entry FrameEntry) (selectedFrame DataFrame)
- func (frame *DataFrame) ShuffleRows()
- func (frame *DataFrame) ToDataset(inputSlice string, outputSlice string) []DataPoint
- func (frame *DataFrame) ToLSTMDataset(inputSlice string, outputSlice string) []DataPoint
- func (frame *DataFrame) ToSequentialDataset(inputSlice string, outputSlice string, intervalLength int) []DataPoint
- type DataPoint
- type FrameEntry
- type NumberEntry
- type StringEntry
- type VectorEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Categorize ¶
func Categorize(entries []FrameEntry) (newColumn []FrameEntry, options []FrameEntry)
func FromOneHot ¶
func GetOutputs ¶ added in v1.3.0
func NormalizeInputs ¶
func NormalizeInputs(dataset []DataPoint)
func SaveDataset ¶
Types ¶
type DataFrame ¶
type DataFrame struct {
// contains filtered or unexported fields
}
func ReadCSV ¶
Reads a csv at the given path into a DataFrame. The headers argument is a boolean representing if the first row in the dataset is just the headers for the columns. This should usually be set to true.
func (*DataFrame) CategorizeColumn ¶
func (frame *DataFrame) CategorizeColumn(title string) (options []FrameEntry)
func (*DataFrame) CategorizeColumnSlice ¶
func (frame *DataFrame) CategorizeColumnSlice(colSlice string) (options [][]FrameEntry)
func (*DataFrame) CategorizeNthColumn ¶
func (frame *DataFrame) CategorizeNthColumn(col int) (options []FrameEntry)
func (*DataFrame) ClampColumn ¶ added in v1.3.0
func (*DataFrame) ClampColumnSlice ¶ added in v1.3.0
func (*DataFrame) ClampNthColumn ¶ added in v1.3.0
func (*DataFrame) DeleteColumnSlice ¶ added in v1.3.0
func (*DataFrame) DeleteColumns ¶
func (*DataFrame) DeleteRows ¶
func (*DataFrame) GetCol ¶
func (frame *DataFrame) GetCol(title string) []FrameEntry
func (*DataFrame) GetNthCol ¶
func (frame *DataFrame) GetNthCol(col int) []FrameEntry
func (*DataFrame) MapFloatColumn ¶
func (*DataFrame) MapFloatColumnSlice ¶
func (*DataFrame) MapNthFloatColumn ¶
func (*DataFrame) MapNthStringColumn ¶
func (*DataFrame) MapStringColumn ¶
func (*DataFrame) MapStringColumnSlice ¶
func (*DataFrame) NormalizeColumn ¶
func (*DataFrame) NormalizeColumnSlice ¶
func (*DataFrame) NormalizeNthColumn ¶
func (*DataFrame) NumericallyCategorizeColumn ¶
func (*DataFrame) NumericallyCategorizeColumnSlice ¶
func (*DataFrame) NumericallyCategorizeNthColumn ¶
func (*DataFrame) OverwriteColumn ¶
func (frame *DataFrame) OverwriteColumn(newColumn []FrameEntry, title string)
func (*DataFrame) OverwriteNthColumn ¶
func (frame *DataFrame) OverwriteNthColumn(newColumn []FrameEntry, col int)
func (*DataFrame) PrintSummary ¶
func (frame *DataFrame) PrintSummary()
func (*DataFrame) SelectColumns ¶
func (*DataFrame) SelectRowSlice ¶ added in v1.3.0
func (*DataFrame) SelectRowsMatching ¶ added in v1.3.0
func (frame *DataFrame) SelectRowsMatching(header string, entry FrameEntry) (selectedFrame DataFrame)
func (*DataFrame) ShuffleRows ¶
func (frame *DataFrame) ShuffleRows()
func (*DataFrame) ToLSTMDataset ¶ added in v1.4.0
type FrameEntry ¶
type FrameEntry interface { FullValue() string DisplayValue() string Equals(FrameEntry) bool MergeInto([]float64) []float64 }
func CreateEntry ¶
func CreateEntry(rawValue string) FrameEntry
func NumericallyCategorize ¶
func NumericallyCategorize(entries []FrameEntry) (newColumn []FrameEntry)
type NumberEntry ¶
type NumberEntry struct {
Value float64
}
func (*NumberEntry) DisplayValue ¶
func (flt *NumberEntry) DisplayValue() string
func (*NumberEntry) Equals ¶
func (flt *NumberEntry) Equals(other FrameEntry) bool
func (*NumberEntry) FullValue ¶
func (flt *NumberEntry) FullValue() string
func (*NumberEntry) MergeInto ¶
func (flt *NumberEntry) MergeInto(vals []float64) []float64
type StringEntry ¶
type StringEntry struct {
Value string
}
func (*StringEntry) DisplayValue ¶
func (str *StringEntry) DisplayValue() string
func (*StringEntry) Equals ¶
func (str *StringEntry) Equals(other FrameEntry) bool
func (*StringEntry) FullValue ¶
func (str *StringEntry) FullValue() string
func (*StringEntry) MergeInto ¶
func (str *StringEntry) MergeInto(_ []float64) []float64
type VectorEntry ¶
type VectorEntry struct {
Value []float64
}
func (*VectorEntry) DisplayValue ¶
func (vec *VectorEntry) DisplayValue() string
func (*VectorEntry) Equals ¶
func (vec *VectorEntry) Equals(other FrameEntry) bool
func (*VectorEntry) FullValue ¶
func (vec *VectorEntry) FullValue() string
func (*VectorEntry) MergeInto ¶
func (vec *VectorEntry) MergeInto(vals []float64) []float64
Click to show internal directories.
Click to hide internal directories.