Documentation
¶
Overview ¶
mkt package provides marketing-related data analysis functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RFM ¶
func RFM(dt insyra.IDataTable, rfmConfig RFMConfig) insyra.IDataTable
RFM performs RFM analysis on the given data table based on the provided configuration. It returns a new data table containing the R, F, M scores and the combined RFM score for each customer.
Types ¶
type RFMConfig ¶
type RFMConfig struct {
CustomerIDColIndex string // The column index(A, B, C, ...) of customer ID in the data table
CustomerIDColName string // The column name of customer ID in the data table (if both index and name are provided, index takes precedence)
TradingDayColIndex string // The column index(A, B, C, ...) of trading day in the data table
TradingDayColName string // The column name of trading day in the data table (if both index and name are provided, index takes precedence)
AmountColIndex string // The column index(A, B, C, ...) of amount in the data table
AmountColName string // The column name of amount in the data table (if both index and name are provided, index takes precedence)
NumGroups uint // The number of groups to divide the customers into
DateFormat string // The format of the date string (e.g., "YYYY-MM-DD", "DD/MM/YYYY", "yyyy-mm-dd")
}
Click to show internal directories.
Click to hide internal directories.