Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterStat ¶
type ClusterStat struct { ClusterNum int Stat *Stat Points []Point `json:"point"` PointsCenter *Point `json:"point_center"` }
ClusterStat is struct for keep statistic data
type DataRawSet ¶
type DataRawSet struct {
// contains filtered or unexported fields
}
DataRawSet is function for keep RFM data
func (*DataRawSet) AddRFMRawData ¶
func (rd *DataRawSet) AddRFMRawData(userID string, recencyNum int, purchaseTransaction int, price float64) (*DataRawSet, error)
AddRFMRawData is function for show raw data in n (row) after skip (row)
func (*DataRawSet) GetRFMRawData ¶
func (rd *DataRawSet) GetRFMRawData() (*DataRawSet, error)
GetRFMRawData is function for show raw data in n (row) after skip (row)
func (*DataRawSet) GetRFMRawDataByRange ¶
func (rd *DataRawSet) GetRFMRawDataByRange(row int, skip int) (*DataRawSet, error)
GetRFMRawDataByRange is function for show raw data in n (row) after skip (row)
type Point ¶
Point is contain data point in chart x and y should contain float64 between 0.00 to 1.00
type RFM ¶
type RFM struct { ClusterSize int OverallStat *Stat Recency *Recency // contains filtered or unexported fields }
RFM is struct for contain Recency
func (*RFM) GenerateRecency ¶
func (rfm *RFM) GenerateRecency(rd *DataRawSet) (*RFM, error)
GenerateRecency is function for process recency
type Recency ¶
type Recency struct { ClusterSize int Cluster []ClusterStat Stat *Stat }
Recency is struct for keep Recency
Click to show internal directories.
Click to hide internal directories.