1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! # K-modes and K-prototypes Clustering
//!
//! This crate provides implementations of the k-modes and k-prototypes clustering algorithms
//! for categorical and mixed (categorical + numerical) data.
//!
//! ## Features
//!
//! - **K-modes**: Clustering for purely categorical data
//! - **K-prototypes**: Clustering for mixed categorical and numerical data
//! - Multiple initialization strategies (Huang, Cao, random)
//! - Parallel processing support via Rayon
//! - Comprehensive distance metrics for categorical data
//!
//! ## Example
//!
//! ```rust
//! use kategorize::{KModes, InitMethod};
//! use ndarray::Array2;
//!
//! // Create sample categorical data
//! let data = Array2::from_shape_vec((4, 2), vec![
//! "A", "X", "A", "Y", "B", "X", "B", "Y"
//! ]).unwrap();
//!
//! // Create k-modes clusterer
//! let mut kmodes = KModes::new(2)
//! .init_method(InitMethod::Huang)
//! .max_iter(100)
//! .n_init(10);
//!
//! // Fit the model and get cluster assignments
//! let result = kmodes.fit(data.view()).unwrap();
//! println!("Cluster labels: {:?}", result.labels);
//! ```
pub use ;
pub use ;
pub use ;
pub use InitMethod;
pub use ;
/// Re-export commonly used types from ndarray
pub use ;