SHiP Core¶
Variables
-
const UltrametricTreeType DEFAULT_ULTRAMETRIC_TREE_TYPE = UltrametricTreeType::DCTree¶
-
const std::string DEFAULT_ULTRAMETRIC_TREE_TYPE_STRING = ultrametric_tree_type_to_string(DEFAULT_ULTRAMETRIC_TREE_TYPE)¶
-
const double DEFAULT_HIERARCHY = 1.0¶
-
const PartitioningMethod DEFAULT_PARTITIONING_METHOD = PartitioningMethod::MedianOfElbows¶
-
const std::string DEFAULT_PARTITIONING_METHOD_STRING = partitioning_method_to_string(DEFAULT_PARTITIONING_METHOD)¶
-
const std::unordered_map<std::string, std::string> DEFAULT_CONFIG = {}¶
-
class SHiP¶
- #include <SHiP.hpp>
Public Functions
-
SHiP(std::vector<std::vector<double>> &data, UltrametricTreeType tree_type = DEFAULT_ULTRAMETRIC_TREE_TYPE, double hierarchy = DEFAULT_HIERARCHY, PartitioningMethod partitioning_method = DEFAULT_PARTITIONING_METHOD, const std::unordered_map<std::string, std::string> &config = DEFAULT_CONFIG)¶
-
void fit(std::optional<double> hierarchy = std::nullopt, std::optional<PartitioningMethod> partitioning_method = std::nullopt, const std::unordered_map<std::string, std::string> &config = {})¶
-
std::vector<long long> fit_predict(std::optional<double> hierarchy = std::nullopt, std::optional<PartitioningMethod> partitioning_method = std::nullopt, const std::unordered_map<std::string, std::string> &config = {})¶
Public Members
-
UltrametricTreeType tree_type¶
-
double hierarchy¶
-
PartitioningMethod partitioning_method¶
-
std::unordered_map<std::string, std::string> config¶
-
std::vector<long long> labels_¶
-
std::vector<long long> cluster_centers_¶
-
long long partitioning_runtime = 0¶
-
std::unordered_map<double, long long> tree_construction_runtime¶
Private Functions
-
std::tuple<std::vector<long long>, std::vector<long long>> partitioning()¶
-
SHiP(std::vector<std::vector<double>> &data, UltrametricTreeType tree_type = DEFAULT_ULTRAMETRIC_TREE_TYPE, double hierarchy = DEFAULT_HIERARCHY, PartitioningMethod partitioning_method = DEFAULT_PARTITIONING_METHOD, const std::unordered_map<std::string, std::string> &config = DEFAULT_CONFIG)¶