Documentation ¶
Overview ¶
This is really the wrong use case for this type of Pipeline, but I wanted to see if I could make it work and wanted to test various error conditions I knew I would discover while I wrote out all the enumerators.
This allowed me to bug fix some bugs in the promise package.
WHAT THIS DOES:
This takes some health data on strokes you can find at: https://www.kaggle.com/fedesoriano/stroke-prediction-dataset
It converts that data to a standard format with enumerators in the first stage and then writes out some stats in the second stage (how many were Males, Females, Married, ...).
Index ¶
- Constants
- func Calculate(ctx context.Context, in interface{}) (data interface{}, err error)
- func Transformer(ctx context.Context, in interface{}) (data interface{}, err error)
- type Conditions
- type Data
- type Residence
- type Sex
- type SmokingStatus
- type Social
- type Stats
- type StrokeDataParser
- type Victim
- type WorkType
Constants ¶
View Source
const (
Residence_type
)
Variables ¶
This section is empty.
Functions ¶
func Transformer ¶
Transformer transforms a csv line ([]string) representing a Victim into a Victim type.
Types ¶
type Conditions ¶
type Conditions struct { HyperTension bool HeartDisease bool GlucoseLevel float64 BMI float64 SmokingStatus SmokingStatus PrevStroke bool }
func (*Conditions) Unmarshal ¶
func (c *Conditions) Unmarshal(line []string) error
type SmokingStatus ¶
type SmokingStatus int8
const ( SmokingStatusUnknown SmokingStatus = 0 Smoked SmokingStatus = 1 NeverSmoked SmokingStatus = 2 Smokes SmokingStatus = 3 FormerlySmoked SmokingStatus = 4 )
func (*SmokingStatus) Unmarshal ¶
func (s *SmokingStatus) Unmarshal(str string) error
type Stats ¶
type StrokeDataParser ¶
type StrokeDataParser struct {
// contains filtered or unexported fields
}
func New ¶
func New() *StrokeDataParser
Click to show internal directories.
Click to hide internal directories.