
Package index
Main Interface
Primary entry point for the MLSampling framework. Use create_ml_sampling_tool() to create a fully configured MLSampling R6 instance that integrates BDL, RF, UDL, UFN, and ensemble optimization methods.
-
MLSampling - MLSampling
-
create_ml_sampling_tool() - Create Enhanced ML Sampling Tool
-
SoilSamplingTool - Legacy SoilSamplingTool Class (Deprecated)
-
create_soil_sampling_tool() - Create default SoilSamplingTool instance (Deprecated)
ML Model Classes
R6 classes implementing the individual ML models. These are instantiated automatically by MLSampling but can also be used directly.
-
BayesianDeepLearning - BayesianDeepLearning
-
RandomForestOptimization - RandomForestOptimization
-
MLEnsembleManager - MLEnsembleManager
-
DesignComparison - DesignComparison
-
SpatialAnalysisEngine - SpatialAnalysisEngine
-
SpatialUncertainty - SpatialUncertainty
Service Classes
Supporting R6 service classes for configuration management, benchmarking, progress tracking, resource management, visualization, and reporting.
-
BenchmarkingService - BenchmarkingService
-
create_benchmarking_service() - Create default benchmarking service
-
ConfigManager - ConfigManager
-
create_default_config_manager() - Create default configuration manager instance
-
ProgressManager - ProgressManager
-
create_progress_manager() - Create default progress manager
-
ReportingService - ReportingService
-
ResourceManager - ResourceManager
-
create_resource_manager() - Create default resource manager
-
VisualizationService - VisualizationService
Field Data Validation
Functions for validating system requirements, field data structures, CRS consistency, and ML-related spatial data quality.
-
validate_system_requirements() - Validate system requirements for constitutional compliance
-
validate_field_data_structure() - Enhanced Field Data Model with ML Metadata Support
-
validate_field_data() - Validate field data structure and spatial integrity
-
validate_crs_consistency() - Validate CRS consistency between spatial objects
-
validate_ml_data() - Validate data for ML modeling
Sampling & Result Validation
Validation functions for sampling location sets, optimization results, and uncertainty quantification outputs.
-
validate_sampling_locations() - Validate sampling locations against field data
-
validate_sampling_locations_model() - Validate sampling locations data structure
-
validate_optimization_result() - Validate optimization result (backward compatibility)
-
validate_ml_optimization_result() - Validate ML optimization result structure
-
validate_uncertainty_results() - Validate uncertainty quantification results
Data Structures
Factory functions for creating standardized result objects used throughout the optimization pipeline.
-
create_sampling_locations() - Sampling Locations Model
-
create_uncertainty_results() - Uncertainty Quantification Model
-
create_spatial_uncertainty() - Create Spatial Uncertainty instance
-
create_ml_optimization_result() - Enhanced ML Results Model
-
create_optimization_result() - Create backward compatibility wrapper
Error Handling
Structured error class hierarchy and handler utilities for robust exception management. All domain errors inherit from MLSamplingError.
-
MLSamplingErrors - Standardized Error Classes
-
MLSamplingError() - Base MLSampling Error
-
BDLError() - Bayesian Deep Learning Error
-
RFError() - Random Forest Optimization Error
-
SpatialError() - Spatial Analysis Error
-
ResourceError() - Resource/Memory Error
-
ConfigError() - Configuration Error
-
ValidationError() - Data Validation Error
-
create_error() - Create a custom error condition
-
raise_error() - Raise a specific error
-
with_error_handling() - Safe execution wrapper
Internal Functions
Low-level helper functions used internally by the package. Documented here for developer reference.
-
BDLError() - Bayesian Deep Learning Error
-
BayesianDeepLearning - BayesianDeepLearning
-
BenchmarkingService - BenchmarkingService
-
ConfigError() - Configuration Error
-
ConfigManager - ConfigManager
-
DesignComparison - DesignComparison
-
MLEnsembleManager - MLEnsembleManager
-
MLSampling - MLSampling
-
MLSamplingError() - Base MLSampling Error
-
MLSamplingErrors - Standardized Error Classes
-
ProgressManager - ProgressManager
-
RFError() - Random Forest Optimization Error
-
RandomForestOptimization - RandomForestOptimization
-
ReportingService - ReportingService
-
ResourceError() - Resource/Memory Error
-
ResourceManager - ResourceManager
-
SoilSamplingTool - Legacy SoilSamplingTool Class (Deprecated)
-
SpatialAnalysisEngine - SpatialAnalysisEngine
-
SpatialError() - Spatial Analysis Error
-
SpatialUncertainty - SpatialUncertainty
-
ValidationError() - Data Validation Error
-
VisualizationService - VisualizationService
-
calculate_derived_uncertainties() - Calculate derived uncertainty measures
-
check_duplicate_coordinates() - Check for duplicate coordinates
-
create_benchmarking_service() - Create default benchmarking service
-
create_default_config_manager() - Create default configuration manager instance
-
create_default_metrics() - Create default performance metrics
-
create_empty_ml_metadata() - Create empty ML metadata structure for future use
-
create_error() - Create a custom error condition
-
create_ml_optimization_result() - Enhanced ML Results Model
-
create_ml_result_metadata() - Create ML result metadata
-
create_ml_sampling_tool() - Create Enhanced ML Sampling Tool
-
create_optimization_result() - Create backward compatibility wrapper
-
create_progress_manager() - Create default progress manager
-
create_resource_manager() - Create default resource manager
-
create_result_metadata() - Create result metadata
-
create_sampling_locations() - Sampling Locations Model
-
create_soil_sampling_tool() - Create default SoilSamplingTool instance (Deprecated)
-
create_spatial_uncertainty() - Create Spatial Uncertainty instance
-
create_uncertainty_results() - Uncertainty Quantification Model
-
determine_primary_crs() - Determine primary CRS from field data
-
extract_metric_value() - Extract metric value safely
-
extract_ml_component() - Extract ML component from ml_components list
-
generate_sample_ids() - Generate automatic sample IDs
-
`%||%` - Helper function for NULL coalescing
-
raise_error() - Raise a specific error
-
standardize_confidence_intervals() - Standardize confidence intervals
-
standardize_existing_samples() - Standardize existing samples format
-
standardize_field_data_structure() - Standardize field data structure with ML enhancements
-
standardize_location_output() - Standardize location output format
-
standardize_ml_metadata() - Standardize ML metadata structure
-
standardize_ml_performance_metrics() - Standardize ML performance metrics
-
standardize_optimization_parameters() - Standardize optimization parameters
-
standardize_performance_metrics() - Standardize performance metrics structure
-
standardize_uncertainty_component() - Standardize uncertainty component
-
standardize_uncertainty_rasters() - Standardize uncertainty rasters
-
standardize_uncertainty_validation_metrics() - Standardize uncertainty validation metrics
-
validate_and_expand_vector() - Validate and expand vector to match required length
-
validate_boundary_geometry() - Validate boundary geometry integrity
-
validate_compliance_structure() - Validate compliance structure
-
validate_confidence_intervals_structure() - Validate confidence intervals structure
-
validate_constitutional_compliance() - Validate constitutional compliance
-
validate_constitutional_spatial_standards() - Validate constitutional spatial standards compliance
-
validate_coordinates_input() - Validate coordinate input format
-
validate_covariate_rasters() - Validate covariate rasters
-
validate_covariates_raster() - Validate covariates raster integrity
-
validate_crs_consistency() - Validate CRS consistency between spatial objects
-
validate_data_quality() - Validate data quality standards
-
validate_feature_importance() - Validate feature importance scores
-
validate_field_boundary_geometry() - Validate boundary geometry
-
validate_field_crs_consistency() - Validate CRS consistency across spatial objects
-
validate_field_data() - Validate field data structure and spatial integrity
-
validate_field_data_structure() - Enhanced Field Data Model with ML Metadata Support
-
validate_location_types() - Validate location types
-
validate_locations_in_boundary() - Validate locations are within field boundary
-
validate_mc_samples() - Validate Monte Carlo samples
-
validate_mc_samples_consistency() - Validate Monte Carlo samples consistency
-
validate_ml_components() - Validate ML components structure
-
validate_ml_components_consistency() - Validate ML components consistency
-
validate_ml_constitutional_compliance() - Validate ML constitutional compliance
-
validate_ml_data() - Validate data for ML modeling
-
validate_ml_metadata() - Validate ML metadata structure
-
validate_ml_method() - Validate ML method specification
-
validate_ml_optimization_result() - Validate ML optimization result structure
-
validate_n_samples() - Validate number of samples
-
validate_numeric_coordinates() - Validate numeric coordinates
-
validate_optimization_result() - Validate optimization result (backward compatibility)
-
validate_result_metrics() - Validate result metrics structure
-
validate_sample_ids() - Validate sample IDs
-
validate_sampling_locations() - Validate sampling locations against field data
-
validate_sampling_locations_model() - Validate sampling locations data structure
-
validate_selected_locations() - Validate selected locations structure
-
validate_single_uncertainty_component() - Validate single uncertainty component
-
validate_spatial_consistency() - Validate spatial consistency across uncertainty components
-
validate_spatial_extent_alignment() - Validate spatial extent alignment
-
validate_spatial_weights() - Validate spatial weights matrix
-
validate_system_requirements() - Validate system requirements for constitutional compliance
-
validate_uncertainty_components() - Validate uncertainty components
-
validate_uncertainty_consistency() - Validate uncertainty consistency
-
validate_uncertainty_maps() - Validate uncertainty maps
-
validate_uncertainty_method() - Validate uncertainty method
-
validate_uncertainty_results() - Validate uncertainty quantification results
-
with_error_handling() - Safe execution wrapper