mkt

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 6 Imported by: 0

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")
}

Jump to

Keyboard shortcuts

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