|
ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
|
A model bundled with its export metadata and optional metrics. More...
#include <Json.hpp>
Public Member Functions | |
| void | compute_metrics (types::FeatureMatrix const &, types::OutcomeVector const &) |
| void | compute_metrics (types::FeatureMatrix const &x, types::OutcomeVector const &y) |
| Compute and store metrics on this export. | |
| json | to_json () const |
| Serialize to JSON. Only defined for Export<Model::Ptr>. | |
| json | to_json () const |
Public Attributes | |
| types::Names | feature_names |
| Names | groups |
| Group name vector — empty for regression (no group concept), non-empty for classification. | |
| T | model |
| int | n_features = 0 |
| int | n_observations = 0 |
| TrainingSpec::Ptr | spec |
Optional metrics — serialized by to_json() when present. | |
| std::optional< VariableImportance > | variable_importance |
| std::optional< Metrics > | training_metrics |
| std::optional< Metrics > | oob_metrics |
A model bundled with its export metadata and optional metrics.
Represents the full JSON export format: { model_type, model, config, meta, [metrics] }.
Use j.get<Export<Tree>>() or j.get<Export<Model::Ptr>>() to deserialize a full export, and model_export.to_json() to serialize.
For Export<Model::Ptr>, construct with training data to compute metrics automatically, or use compute_metrics() after construction.
| void ppforest2::serialization::Export< Model::Ptr >::compute_metrics | ( | types::FeatureMatrix const & | , |
| types::OutcomeVector const & | ) |
| void ppforest2::serialization::Export< T >::compute_metrics | ( | types::FeatureMatrix const & | x, |
| types::OutcomeVector const & | y ) |
Compute and store metrics on this export.
Only defined for Export<Model::Ptr>.
| json ppforest2::serialization::Export< T >::to_json | ( | ) | const |
Serialize to JSON. Only defined for Export<Model::Ptr>.
| json ppforest2::serialization::Export< Model::Ptr >::to_json | ( | ) | const |
| types::Names ppforest2::serialization::Export< T >::feature_names |
| Names ppforest2::serialization::Export< T >::groups |
Group name vector — empty for regression (no group concept), non-empty for classification.
| T ppforest2::serialization::Export< T >::model |
| int ppforest2::serialization::Export< T >::n_features = 0 |
| int ppforest2::serialization::Export< T >::n_observations = 0 |
| std::optional<Metrics> ppforest2::serialization::Export< T >::oob_metrics |
| TrainingSpec::Ptr ppforest2::serialization::Export< T >::spec |
| std::optional<Metrics> ppforest2::serialization::Export< T >::training_metrics |
| std::optional<VariableImportance> ppforest2::serialization::Export< T >::variable_importance |