Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgorithmConfig ¶ added in v1.2.0
type AlgorithmConfig struct {
// NIPALS algorithm parameters
NIPALS NIPALSConfig `json:"nipals"`
// Kernel PCA algorithm parameters
KernelPCA KernelPCAConfig `json:"kernel_pca"`
}
AlgorithmConfig holds tunable parameters for PCA algorithms. These values affect the accuracy/performance trade-off of iterative methods.
func DefaultAlgorithmConfig ¶ added in v1.2.0
func DefaultAlgorithmConfig() AlgorithmConfig
DefaultAlgorithmConfig returns algorithm parameters suitable for typical well-conditioned datasets. Override these only when working with ill-conditioned data or when tighter numerical precision is required.
type AnalysisConfig ¶
type AnalysisConfig struct {
// Default number of components if not specified
DefaultComponents int `json:"default_components"`
// Whether to show preview of transformed data
ShowPreview bool `json:"show_preview"`
// Maximum number of rows to show in preview
PreviewMaxRows int `json:"preview_max_rows"`
}
AnalysisConfig holds analysis configuration
type CLIConfig ¶
type CLIConfig struct {
// CSV parsing configuration
CSV CSVConfig `json:"csv"`
// Output configuration
Output OutputConfig `json:"output"`
// Analysis configuration
Analysis AnalysisConfig `json:"analysis"`
}
CLIConfig holds configuration for the CLI application
func DefaultConfig ¶
func DefaultConfig() *CLIConfig
DefaultConfig returns the default configuration
type CSVConfig ¶
type CSVConfig struct {
// Number of rows to sample for column type detection
TypeDetectionSampleSize int `json:"type_detection_sample_size"`
// Default null value strings
DefaultNullValues []string `json:"default_null_values"`
}
CSVConfig holds CSV parsing configuration
type GUIConfig ¶
type GUIConfig struct {
// Visualization configuration
Visualization VisualizationConfig `json:"visualization"`
// UI configuration
UI UIConfig `json:"ui"`
}
GUIConfig holds configuration for the GUI application
func DefaultGUIConfig ¶
func DefaultGUIConfig() *GUIConfig
DefaultGUIConfig returns the default GUI configuration
type KernelPCAConfig ¶ added in v1.2.0
type KernelPCAConfig struct {
// Minimum eigenvalue: eigenvalues below this threshold are clamped to it
// to avoid division-by-zero when normalizing eigenvectors.
// This is a numerical stability guard, not a truncation criterion.
MinEigenvalue float64 `json:"min_eigenvalue"`
}
KernelPCAConfig holds parameters for the Kernel PCA algorithm.
type NIPALSConfig ¶ added in v1.2.0
type NIPALSConfig struct {
// Convergence tolerance: iteration stops when the change in the score vector
// (Euclidean norm of t_new - t_old) falls below this threshold.
// Smaller values give more precise components at the cost of more iterations.
Tolerance float64 `json:"tolerance"`
// Maximum number of power iterations per component.
// For well-conditioned data, convergence typically occurs in <50 iterations.
// Increase only if you see "did not converge" warnings on ill-conditioned data.
MaxIterations int `json:"max_iterations"`
}
NIPALSConfig holds parameters for the NIPALS (Nonlinear Iterative Partial Least Squares) power-iteration algorithm used for standard and missing-value PCA.
Reference: Wold (1966), "Estimation of principal components and related models by iterative least squares", in Multivariate Analysis, pp. 391-420.
type OutputConfig ¶
type OutputConfig struct {
// Suffix for output files
FileSuffix string `json:"file_suffix"`
// Whether to create output directory if it doesn't exist
CreateOutputDir bool `json:"create_output_dir"`
}
OutputConfig holds output file configuration
type UIConfig ¶
type UIConfig struct {
// Maximum rows to show in data preview
DataPreviewMaxRows int `json:"data_preview_max_rows"`
// Maximum columns to show in data preview
DataPreviewMaxCols int `json:"data_preview_max_cols"`
// Default zoom factor for plots
DefaultZoomFactor float64 `json:"default_zoom_factor"`
}
UIConfig holds UI-related configuration
type VisualizationConfig ¶
type VisualizationConfig struct {
// Threshold for showing variables in loadings plot
LoadingsVariableThreshold int `json:"loadings_variable_threshold"`
// Maximum variables to display in biplot
BiplotMaxVariables int `json:"biplot_max_variables"`
// Maximum variables to display in circle of correlations
CircleMaxVariables int `json:"circle_max_variables"`
// Threshold for correlation circle
CorrelationThreshold float64 `json:"correlation_threshold"`
// Elbow threshold for scree plot
ElbowThreshold float64 `json:"elbow_threshold"`
// Diagnostic plot thresholds
MahalanobisThreshold float64 `json:"mahalanobis_threshold"`
RSSThreshold float64 `json:"rss_threshold"`
// Default confidence level for ellipses
DefaultConfidenceLevel float64 `json:"default_confidence_level"`
// Maximum samples for kernel matrix visualization
MaxKernelMatrixSamples int `json:"max_kernel_matrix_samples"`
}
VisualizationConfig holds visualization-related configuration