No articles match
The Algorithm Collection16 hours ago
Overview | Who This Vignette Is For | The Race | Watch It Run | Hungarian on a 30x30 | Auction on a 30x30 | Gabow-Tarjan bit-scaling on a 30x30 | Jonker-Volgenant pre-stages on a 30x30 | The Problem | The LP Formulation | Duality: The Key to Efficiency | The Classics | Hungarian Algorithm (1955) | Jonker-Volgenant Algorithm (1987) | The Scaling Revolution | Auction Algorithm (1988) | Cost-Scaling Algorithm / CSA (1995) | Gabow-Tarjan Algorithm (1989) | Orlin-Ahuja Algorithm (1992) | The Network View | Network Simplex | Push-Relabel Algorithm | The Specialists | HK01: Binary Costs | SAP and LAPMOD: Sparse Problems | Ramshaw-Tarjan: Rectangular Problems (2012) | Beyond Standard Assignment | K-Best Solutions (Murty's Algorithm) | Bottleneck Assignment | Sinkhorn: Soft Assignment | Dual Variables | The Benchmark | Quick Reference | References
Advanced Topics5 days ago
Overview | 1. Understanding the Algorithms | 1.1 Exact vs Greedy: When to Use Each | Exact Mode (Graph-Theoretic) | Greedy Mode (Heuristic) | Auto Mode (Recommended) | 1.2 Complexity Analysis with Benchmarks | 1.3 Deterministic Tie-Breaking | 1.4 Grouped Pruning | Basic Usage | Parameters | When to Use | 2. Custom Engines for modelPrune() | 2.1 Understanding Custom Engines | What is a Custom Engine? | Built-in Criteria | How Custom Engines Work | Engine Structure Requirements | 2.2 Example: INLA Engine (Bayesian Spatial Models) | Background | Implementation | How It Works | 2.3 Example: mgcv Engine (GAMs) | 2.4 Example: Custom Criterion (AIC-Based) | 2.5 Validation and Error Handling | Automatic Validation | Validation Checklist | Debugging Tips | 3. Exact Subset Enumeration | 3.1 When You Need ALL Maximal Subsets | 3.2 Exploring Multiple Subsets | 3.3 Extracting Specific Subsets | 3.4 Advanced: Domain-Specific Subset Selection | 4. Performance Optimization | 4.1 Precomputed Correlation Matrices | 4.2 Memory Considerations for Large Data | Memory-Efficient Correlation Computation | Sparse Correlation Matrices | 4.3 Parallel Processing Strategies | 4.4 Choosing the Right Mode | 5. Troubleshooting | 5.1 Common Errors and Solutions | Error: "No valid subsets found" | Error: force_in variables conflict with threshold | Error: VIF computation fails in modelPrune() | 5.2 Threshold Selection Guidance | For corrPrune() (Correlation Threshold) | For modelPrune() (VIF Limit) | Empirical Approach: Visualize First | 5.3 Handling Edge Cases | Single Predictor After Pruning | All Variables Removed | Mixed-Type Data | 6. Best Practices | 6.1 Workflow Recommendations | For Exploratory Analysis | For Publication-Quality Analysis | 6.2 Combining with Other Methods | 7. Summary | Key Takeaways | Algorithms | Custom Engines | Optimization | Troubleshooting | 8. References | See Also | Session Info
Complete Workflows: Real-World Examples5 days ago
Overview | Workflow 1: Ecological Modeling | Data | Correlation-based pruning | Correlation distribution | Fit models | Model comparison | Visualization | Coefficient stability | Workflow 2: Survey Data Analysis | Prune with protected variables | Construct coverage | Model satisfaction | Workflow 3: High-Dimensional Data | Greedy pruning | Dimensionality reduction | Exact vs greedy comparison | Classification | Workflow 4: Mixed Models | Prune fixed effects | Final model | VIF verification | VIF reduction visualization | Summary | See Also | References | Session Info
Quick Start5 days ago
Installation | What corrselect Does | Interface Hierarchy | Level 1: Simple Pruning | Level 2: Structured Subset Selection | Level 3: Low-Level Matrix Interface | Quick Examples | corrPrune(): Association-Based Pruning | modelPrune(): VIF-Based Pruning | corrSelect(): Enumerate All Maximal Subsets | assocSelect(): Mixed-Type Data | Protecting Variables | Threshold Selection | Interface Selection Guide | Quick Reference | corrPrune() | modelPrune() | corrSelect() | assocSelect() | MatSelect() | corrSubset() | Troubleshooting | See Also | Session Info
Theory and Formulation5 days ago
Overview | Contents | Terminology | Association measure | Association matrix | Threshold ((\tau)) | Valid subset | Maximal valid subset | Threshold graph | Clique | Maximal clique | Forced-in variables (force_in) | ELS (Eppstein–Löffler–Strash) | Bron–Kerbosch | Greedy mode | Exact mode | Auto mode | Intuitive Overview | The Core Idea | How corrselect Works | Why "Maximal" Not "Maximum"? | Toy Example (4 Variables) | Graph Representation | Visual Graph Representation | Network Visualization with cor_example | Finding Maximal Cliques | Key Insight | Problem Formulation | Intuitive Problem Statement | Formal Problem Statement | Association Matrix | Threshold Constraint | Maximal Valid Subsets | Graph-Theoretic Interpretation | Why Graphs? | Threshold Graph | Maximal Cliques | Example: 6-Variable Threshold Graph | From Theory to Implementation | Threshold ((\tau)) → threshold argument | Maximal cliques → Returned subsets | Forced-in set ((F)) → force_in argument | Search type → mode and method arguments | Association matrix ((A)) → Data input and matrix-based functions | Graph density → Performance considerations | Example mapping | Search Algorithms | Exact Enumeration | Eppstein–Löffler–Strash (ELS) | Pseudocode for Practitioners | Greedy Heuristic | Algorithm Pseudocode | Bron–Kerbosch with Pivoting | Forced Variables | Graph Modification | Correlation vs Association | Complexity Analysis | Output Structure | Design Philosophy | Why Hard Threshold Not Soft Constraint? | Why Graph Algorithms Not Optimization? | Why Pairwise Associations Only? | Why Enumerate All Solutions Not Just Return One? | References | Graph-Theoretic Algorithms | Multicollinearity and Variable Selection | Association Measures | Threshold Graph Theory | Computational Complexity | Applications | See Also | Session Info
Comparison with Alternatives5 days ago
Overview | Evaluation Dataset | Comparison 1: caret::findCorrelation() | Method | Execution | Distribution Comparison | Comparison | Applications | Comparison 2: Boruta | Sequential Application | Comparison 3: glmnet (LASSO/Ridge) | Coefficient Comparison | Comparison 4: modelPrune() vs Manual VIF Removal | Manual Implementation | modelPrune() Comparison | Visual: VIF Comparison | Summary | Method Selection | corrselect Distinguishing Features | Integrated Workflow | References | See Also | Session Info
Advanced Topics5 days ago
Overview | Who This Vignette Is For | Documentation Roadmap | Why Pixels? | Scientific Applications at a Glance | The General Matching Problem | Problem Formulation | Computational Challenge | Visual Illustration: Pixel Morphing | Exact Pixel Matching | Feature Quantization Morph (Strategy 1) | Hierarchical Morph (Strategy 2) | Three Approximation Strategies | Strategy 1: Feature Quantization | Mathematical Formulation | Complexity Reduction | Quality Trade-offs | Strategy 2: Hierarchical Decomposition | Complexity (Sketch) | High-Level Algorithm | Strategy 3: Resolution Reduction | Complexity | Strategy Comparison | Implementation Details of Exact Pixel Matching | Application to Scientific Domains | Ecology: Vegetation Plot Matching | Physics: Particle Tracking | Chemistry: Molecular Conformation Alignment | Implementation Notes | Customizing Morph Duration | Using the Example Code | Regenerating Examples | Mathematical Foundation: Optimal Transport | Monge Problem | Kantorovich Relaxation | Discrete Linear Assignment | Wasserstein Distance | Further Reading | Optimal Transport Theory | Scientific Applications | Assignment Algorithms | Connection to couplr Workflows | When Do These Strategies Apply? | Practical Recommendations | Limitations of Approximation Strategies | Summary | See Also
Comparison with Alternatives5 days ago
Overview | Evaluation Dataset | Comparison 1: MatchIt | MatchIt Approach | couplr Approach | Balance Comparison | Key Differences | When to Use Each | Comparison 2: optmatch | optmatch Approach | Performance Comparison | Comparison 3: designmatch | designmatch Approach | Comparison 4: Matching Package | Matching Package Approach | Runtime Scaling | Memory Usage | Feature Comparison Summary | Decision Guide | Choose couplr when: | Choose MatchIt when: | Choose optmatch when: | Choose designmatch when: | Workflow Integration | Sequential Pipeline | Complementary Use | Real-World Case Study: Job Training Evaluation | Background | Simulating Lalonde-Style Data | Challenge: Large Control Pool | Balance Assessment | Interpretation | Key Takeaways | References | See Also
Matching Workflows5 days ago
Overview | Who This Vignette Is For | Documentation Roadmap | The Running Example: Job Training Evaluation | Key Features | Problem Definition | The Matching Problem | Why Matching Matters | Distance Metrics | Basic Usage | Creating a Matched Sample | Understanding the Output | Automatic Preprocessing | Why Preprocessing Matters | Smart Scaling with auto_scale = TRUE | Scaling Methods | Health Checks and Warnings | Optimal vs Greedy Matching | When to Use Each Approach | Greedy Strategies | Caliper Constraints | Why Use Calipers | Choosing Caliper Width | Blocking and Stratification | Why Use Blocking | Exact Blocking with matchmaker() | Cluster-Based Blocking | Balance Diagnostics | Key Balance Metrics | How to Interpret Balance Results | Visualizing Balance | Real-World Example: Treatment Effect Estimation | Scenario | Step 1: Data Preparation | Step 2: Perform Matching | Step 3: Assess Balance | Step 4: Estimate Treatment Effect | Step 5: Publication-Ready Output | Performance Considerations | Scalability | Memory Usage | Optimization Tips | What Can Go Wrong | Problem: Poor Balance Despite Matching | Problem: Very Few Matches | Problem: Matching Takes Too Long | Problem: Memory Error | Summary | Advanced Matching Techniques | Full Matching (Variable-Ratio Groups) | Ratio Matching (k:1) | With-Replacement Matching | Propensity Score Matching | Cardinality Matching | Coarsened Exact Matching (CEM) | Subclassification | Ecosystem Integration | Sensitivity Analysis | Visualizing Results with autoplot | See Also
Quick Start5 days ago
What couplr Does | Documentation Roadmap | Your First Match | Understanding the Output | Why Scaling Matters | Checking Match Quality | Visualizing Match Quality | Large Datasets: Use Greedy Matching | Setting a Maximum Distance (Caliper) | Matching Within Groups (Blocking) | Full Matching: Keep Every Unit | Other Matching Methods | Complete Example | Next Steps | Additional: Direct Assignment Problem Solving | lap_solve(): Matrix-Based Assignment | Forbidden Assignments | Maximization | Grouped Data | K-Best Solutions | See Also
Troubleshooting Guide5 days ago
Overview | Infeasible Problems | Symptom | Cause | Diagnosis | Solutions | Poor Balance Despite Matching | Causes | Performance Issues | Memory Errors | Different Results with Different Methods | Missing Values in Data | Installation Issues | C++ Compilation Errors | Common Error Messages | "method_used attribute is NULL" | "Cost matrix contains non-finite values" | "All rows assigned to Inf columns" | "subscript out of bounds" | Getting Help | See Also
Quick Start5 days ago
Spatial Analysis Done Right | Basic Usage | Accessing HexData | With sf Objects | Real-World Example: Species Occurrence Data | Assign Points to Grid Cells | Generate Cell Polygons and Visualize | Species Richness Map | Core Concepts | HexGridInfo Slots | HexData Slots | Caveats | Pentagon Cells | Multi-Scale Analysis | Integer Limits | See Also
Mathematical Foundations6 days ago
Overview | The Problem: Equal-Area Grids on a Sphere | The Lambert Azimuthal Equal-Area Projection | Definition | Forward Formulas | Equal-Area Proof | Inverse Formulas | Limitations | The Icosahedron | Geometry | Vertex Latitude Derivation | Standard ISEA Orientation | Snyder's ISEA Projection | Key Constants | Forward Projection Steps | The Inverse Projection | Aperture and Resolution | Aperture Properties | Cell Count Growth | Orientation Classes | Pentagon Cells | Coordinate Systems and Indexing | Triangle to Quad | Quad IJ: The Integer Lattice | Hierarchical Index Types | Z7 Index (Aperture 7) | Z3 Index (Aperture 3) | Z-Order Index (Morton Curve) | Index Type Comparison | SEQNUM: The Flat Cell ID | Compact uint64 Storage | H3 Comparison | Architecture | The Area Variation Trade-Off | Resolution Mapping | When to Use Which | Round-Trip Accuracy | Summary of ISEA Properties | References
Practical Workflows6 days ago
One Grid, Many Datasets | The Problem | The Solution: Shared Grid Objects | Combining at the Cell Level | Grid Generation | Grid Over a Rectangular Region | Grid Over a Polygon (Shapefile) | Global Grid | Multi-Resolution Analysis | Scale-Dependent Patterns | Spatial Joins | Cell-Level Aggregation and Neighbors | Choosing Resolution | By Target Area | Resolution Table (Aperture 3) | Comparing Apertures | Working with sf | Convert HexData to sf | Visualize with ggplot2 | Export to GIS Formats | Edge Cases | Handling NA Coordinates | Polar Regions | Date Line | Function Summary | See Also
Visualization6 days ago
Sample Data | Base R Plotting with plot() | Basic Plot | Customizing Colors and Styling | Disabling the Basemap | Setting Map Extent | Showing Points | Basic Points | Point Size Presets | Custom Point Styling | Disabling Jitter | ggplot2 with hexify_heatmap() | Basic ggplot | Customizing with ggplot2 | Adding Custom Layers | Heatmaps with Value Mapping | Creating Aggregated Data | Basic Heatmap | Customizing Colors | Basemap Options | World Map Helper | Customizing the World Map | Pentagon Cell Visualization | Random Sampling Visualization | Building Custom Visualizations | Function Reference | See Also
Streaming spatial operations13 days ago
The problem | How geometry travels | Per-feature transforms with spatial_map | Smooth geometry with spatial_smooth | Select by location with spatial_filter | Cut geometry with spatial_clip | Split geometry with spatial_split | Tag features with spatial_join | When both sides are larger than RAM | Same answer as resident sf | At scale | Nearest features with spatial_knn | Merge geometries with spatial_dissolve | Split overlaps apart with spatial_overlay | A second layer | Materializing and round-tripping | The cost model | Practical guidance | Where to go next
Working with Large Data13 days ago
Introduction | Streaming pipelines | Batch sizing | Append workflows | Delete and tombstones | Diff between snapshots | External sort | Streaming joins | Multi-file workflows | Format conversion ETL | Memory budget planning | Cleanup
Format Backends14 days ago
Introduction | The .vtr format | CSV | SQLite | Excel | GeoTIFF | Integer pixel types | Embedded metadata | Point extraction | Streaming conversion pipelines | Batch size | Format comparison
Species Distribution Models14 days ago
What vectra does for a distribution model | Align coordinates before extracting | Build a predictor table | Fit in memory when the table fits | Stream when the table is larger than memory | A single pass with collect_chunked() | An out-of-core GLM with chunk_feeder() | Transferability: is a projection environment novel? | Choosing a path
Getting Started with vectra23 days ago
Introduction | Writing and reading data | Filtering and selecting | Transforming columns | String operations | Aggregation | Sorting and slicing | Joins | Window functions | Dates and times | String similarity | Tree traversal | Format backends | Indexes | Incremental operations | Materialized blocks | Inspecting the plan | Where to go next | Cleanup
Indexing and Query Optimization24 days ago
Introduction | Zone-map pruning | Hash indexes | Composite indexes | Case-insensitive indexes | %in% acceleration | Column pruning | Predicate pushdown | Reading explain() output | Materialized blocks | Practical guidance
Joins24 days ago
Introduction | Key specification | Left join | Inner join | Right and full joins | Filtering joins: semi and anti | Cross join | Fuzzy joins | Multi-column keys | Key coercion and NA handling | Memory and performance | Practical guidance
Offloading: streaming, monoids, and out-of-core fits24 days ago
Two cost models | When a reduction streams in one pass | The offload functor | Localizing coupling by sorting and partitioning | The monoidal reduce, and the law it rests on | The cost tiers | A note on the abstraction | Choosing a path
Out-of-core GIS with vectra24 days ago
The streaming envelope | From a raster to one row per cell | Select by location | Rasterize a streamed point set | Terrain on a streamed DEM | Back from raster to vector | Masking and raster math | Distance to the nearest feature | The cost model | Where to go next
Star Schemas and Lookup24 days ago
The flat-table problem | The star schema concept | Setting up a schema | Looking up dimension columns | Match reporting | Named keys | Join modes | Reusing the schema | Practical patterns | Pattern 1: filtering before lookup | Pattern 2: aggregation after lookup | Pattern 3: multiple dimensions in one aggregation | Pattern 4: writing results back | When not to use a schema
String Operations and Fuzzy Matching24 days ago
Introduction | Basic string functions | Trimming whitespace | Case conversion | String length | Extracting substrings | Prefix and suffix tests | String concatenation | paste0: no separator | paste: custom separator | Multi-column paste | Pattern matching: fixed strings | Filtering with grepl | Replacing with gsub and sub | sub: first match only | Pattern matching: regex | Regex filtering with grepl | Regex replacement with gsub | sub with regex: first match only | str_extract: capturing structured parts | Fuzzy string matching | Levenshtein distance | Damerau-Levenshtein distance | Jaro-Winkler similarity | Choosing a distance metric | Filtering by distance threshold | Ranking by similarity | Fuzzy joins | Basic fuzzy join | Methods: dl, levenshtein, jw | Blocking for performance | Thread control | Block lookups | Exact lookups | Case-insensitive lookups | Fuzzy lookups | Performance | Tier 1: byte-level operations (essentially free) | Tier 2: pattern matching (depends on pattern complexity) | Tier 3: fuzzy distance computation (CPU-bound) | Two-pass string building | Practical guidance | Which distance metric for which use case | Choosing max_dist thresholds | Handling encoding issues | Common cleaning patterns | Combining approaches
Geometry functions in expressions24 days ago
A layer to work on | Measures | Predicates | Distance | Aggregating a measure | Transforms | The second geometry of a binary op | Missing geometry | Where this fits
Coverage and topology24 days ago
From lines to polygons | Cleaning a coverage | Decomposing geometry | Set-wise constructions | Linear referencing
Network analysis24 days ago
Building a network | Shortest routes | Service areas and isochrones | Weighted and directed networks | The streaming model
Common Join Problems1 months ago
Trailing and leading whitespace | Case mismatches | Encoding and invisible characters | Empty strings masquerading as data | Factor keys | Near-matches and typos | Duplicate keys | NA keys | Type mismatches | Numeric keys with floating-point noise | Many-to-many explosions | No matches at all | Differently named key columns | Troubleshooting workflow | See Also
Joins in Production1 months ago
Assertions with key_check() | Silent Joins in Pipelines | Inspecting Reports Programmatically | Cardinality Guards | Testing Join Contracts with testthat | Logging and Audit Trails | Manual logging | Automatic logging | Reading JSON Logs Downstream | Diagnosing a Multi-Join Pipeline | Sampling for Large Datasets | A Complete Production Pattern | The Cost of Diagnostics
Quick Start1 months ago
String Diagnostics | Whitespace | A Quick Gate: key_check() | Keys with Different Names | Case Mismatches | Encoding and Invisible Characters | Near Matches | Type Mismatches | Combining Multiple Issues | Duplicate Keys | The JoinReport Object | print(), summary(), and plot() | Auto-Repair | Dry Run | Applying Repairs | Repairing a Single Table | What Repair Does Not Fix | Repair Suggestions from a Report | Row Count Predictions | Sampling Large Tables | Post-Join Diagnostics | Explaining Row Count Changes | Before/After Comparison | Safe Join Wrappers | Quiet Mode and Deferred Reports | Cardinality Enforcement | Advanced Features | Cartesian Product Detection | Multi-Table Join Chains | Backend Support | Logging and Audit Trails | Quick Reference | Further Reading
Why Your Keys Don't Match1 months ago
What a Join Actually Compares | What join_spy() Scans For | Whitespace | Case | Invisible characters and encodings | Empty strings | Types, factors, and numeric keys | Duplicates, NAs, and predicted row counts | Near matches | Compound keys | Scenario 1: The Excel Export | Scenario 2: Two Databases, Two Conventions | Scenario 3: The PDF Copy-Paste | Scenario 4: The Slowly Growing Mismatch | Scenario 5: Compound Keys | The Pattern
Working with Backends1 months ago
Auto-detection | From wrapper to engine call | Explicit override | Class preservation | Backend differences, demonstrated | Column-name collisions | Row ordering | NA keys match each other | join_strict(), .quiet, and the report flow | Diagnostics are backend-agnostic | Choosing a backend | See Also
Runtime Contracts for R Functions1 months ago
Overview | Reusable Schemas | Dependent Validation | Enum Arguments | Arbitrary Classes | Data Frame with Mixed Constraints | Checking Without Stopping | Custom Steps | Self-Documentation | Using Contracts in Packages | Relation to checkmate
Getting started with texanshootR2 months ago
A first run | The publication chain | XP, chain length, career tier | Auto-generating the chain | Locked stages and broken chains | Career, achievements, cosmetics | Persistent state | Resetting | Next steps
Multiple Legends3 months ago
Overview | Example Plot | Hiding Legends | Selecting Legends | Controlling Legend Order | Merging and Splitting Legends | Forcing Merge | Forcing Split | Positioning Legends Separately | Styling Legends Separately | Combining Multiple Controls | Four Legends, One per Side | Six Legends, Stacked per Side | What each step is doing | Why one line per parameter | Summary
Getting Started with ggguides3 months ago
Overview | Installation | Basic Usage | Moving the Legend | Inside Positioning | Removing the Legend | Styling Legends | Wrapping Legend Entries | Combining Functions | What's Next
Legend Positioning3 months ago
Overview | Basic Positioning | Left and Right | Top and Bottom | Alignment with Titles | Inside Positioning | Using Shortcuts | Using Coordinates | Adding Background | Direction Control | Horizontal and Vertical | Combining Direction and Position | Removing the Legend | Summary
Patchwork Integration3 months ago
Overview | The Problem: Duplicate Legends | Basic Legend Collection | Position Options | Stacked Plots | Default: Centered | Spanning Full Height | Attaching to Specific Rows | Collecting Duplicate Axes | Combining with Styling | Complex Layouts | cowplot / Grid Users | get_legend() - Extract Legend | shared_legend() - Combine Plots with Shared Legend | Summary
Styling & Customization3 months ago
Overview | Font Styling | Font Size | Font Family | Title Emphasis | Text Rotation | Basic Rotation | Vertical Labels | Title Rotation | Background and Border | Key Size | Margin | Full Styling Example | Wrapping Legend Entries | By Columns | By Rows | With Bottom Position | Customizing Legend Keys | Enlarging Small Points | Removing Transparency | Combining Overrides | Targeting Specific Aesthetics | Changing Symbol Shapes | Filled Shapes with Outlines | Reordering Legend Entries | Explicit Order | Using Functions | Other Aesthetics | Reversing Legend Order | Combining Style Functions | Styling Continuous Color Bars | Basic Usage | Size Adjustments | Horizontal Orientation | Adding a Frame | Removing Ticks | Combined Customization | Summary
vectra Engine Reference4 months ago
What vectra is | Execution model | Pull-based pipeline | Selection vectors (zero-copy filtering) | Columnar storage | Data sources | Output sinks | Supported verbs | Transformation verbs | Aggregation verbs | Ordering verbs | Join verbs | Window functions | Other verbs | tidyselect support | Supported types | Base types | Annotated types | Coercion rules | Arithmetic and comparison expressions | Join key coercion | bind_rows coercion | NA semantics | Storage | Propagation | is.na() | Ordering guarantees | Streaming vs materializing | Streaming nodes (constant memory per batch) | Materializing nodes | External sort (spill-to-disk) | Join memory model | The .vtr file format | Layout | Version history | Encoding and compression (v4) | Query optimizer | Predicate pushdown | Column pruning | Hidden mutate insertion | explain() contract | Hash indexes (.vtri) | Creating indexes | Index format | How the scan uses indexes | Performance characteristics | Materialized blocks | Exact lookups | Fuzzy lookups | Use case | OpenMP parallelization | Which operations parallelize | Thread safety | Current limitations | Fallback behavior | Grouping preservation | Package conflicts
Temporal Cross-Validation4 months ago
Introduction | The problem: temporal autocorrelation | Simulating temporal data | Temporal block CV | Expanding window CV | Embargo periods | Comparing random vs temporal CV | Concept drift detection | Practical guidance | Choosing a strategy | Rules of thumb with specific numbers | When NOT to use temporal CV | Panel data | End-to-end workflow | References
Model Comparison with Blocked Cross-Validation4 months ago
Introduction | Simulating spatial data | Quantifying inflation | Fair model ranking | Confidence intervals on metrics | Is the signal real? | Per-fold performance | Full comparison pipeline | Practical guidance | How many repeats for borg_compare_cv() | How many permutations for borg_null_test() | How many bootstrap replicates | When to report which metric | When model comparison is misleading | Reporting for publications | Number of folds | Minimum sample size | References
Risk Taxonomy4 months ago
Risk Classification | Hard Violations | 1. Index Overlap | 2. Duplicate Rows | 3. Preprocessing Leakage | 4. Target Leakage (Direct) | 5. Group Leakage | 6. Temporal Ordering Violation | 7. CV Fold Contamination | 8. Model Scope | Soft Inflation Risks | 1. Target Leakage (Proxy) | 2. Spatial Proximity | 3. Spatial Overlap | 4. Random CV on Dependent Data | Risk Interactions | Spatial + Target Leakage | Preprocessing + Spatial Structure | Groups + Temporal Ordering | Temporal + Spatial | Decision Tree: Which Risks to Check | Practical Guidance | Hard vs. Soft: Triage Order | How Risk Severity Scales with Dataset Size | Rules of Thumb | Quick Reference | Accessing Risk Details | See Also
Area of Applicability and Extrapolation Detection4 months ago
Introduction | The Dissimilarity Index | What it measures | Basic usage | Variable importance weighting | Area of Applicability | From DI to a binary mask | Full worked example | Cross-validated threshold | Manual threshold | Extrapolation Detection | Univariate and multivariate checks | Worked example | Comparing extrapolation and AOA | Transferability Assessment | Quantifying performance decay with distance | Interpreting transfer ratios | Prediction Maps | Spatial uncertainty from cross-validation | Stability Maps | Where predictions change with the training set | Stability maps versus prediction maps | Combining AOA with Blocked Cross-Validation | The full pipeline | Diagnose dependencies | Generate blocked CV folds | Fit and evaluate with honest folds | Compute spatially-aware importance | Determine the area of applicability | Generate predictions with AOA mask | Check for extrapolation in the reliable predictions | Practical Guidance | When to use the AOA | When the AOA is less useful | Interpretation guidelines | Mahalanobis distance and its limitations | Reporting AOA results in publications | Connecting to the broader BORG workflow | References
Feature Selection with Blocked Cross-Validation4 months ago
Introduction | Simulated data | Block-permutation importance | The problem with standard permutation importance | How block-permutation importance works | Worked example | Comparing block vs. row permutation | Forward feature selection | Why greedy search with blocked CV | Step-by-step example | Using a custom model | Interpreting the selection path | Best subset selection | SHAP values | Beyond global importance | Spatial SHAP | When to use SHAP vs. permutation importance | Comparing methods | Full pipeline | Diagnose dependencies | Generate blocked folds | Screen with permutation importance | Forward selection on screened candidates | Fit the final model | Interpret with SHAP | Practical guidance | How many features relative to sample size? | Stability of selection | Collinearity and importance | When NOT to do feature selection | Reporting feature selection in publications | Temporal and grouped data | References
Framework Integration4 months ago
Why This Guide Exists | Quick Reference | Base R | Safe Preprocessing Pattern | caret | When to Use BORG with caret | Validating preProcess Objects | Guarded trainControl | Pipeline-Level Validation with borg_pipeline() | tidymodels (rsample + recipes) | When to Use BORG with tidymodels | Validating Recipe Objects | Guarded rsample Functions | Converting BORG Folds to rset Objects | Convenience Constructors: borg_spatial_cv() and borg_temporal_cv() | Validating Existing rsample Objects | mlr3 | When to Use BORG with mlr3 | Validating mlr3 Tasks and Resamplings | Generating mlr3 Resamplings from BORG Folds | Species Distribution Models | ENMeval | biomod2 | Temporal Data Workflows | Basic Temporal Validation | Rolling Origin with rsample | Spatial Data Workflows | Spatial Block Validation | Automatic Spatial CV Generation | Grouped Data Workflows | Complete Pipeline Validation | borg_validate(): Workflow-Level Checks | Catching Overlap | borg_pipeline(): Stage-by-Stage Decomposition | Automatic Repair with borg_assimilate() | Migration Checklist | See Also
Post-Fit Diagnostics4 months ago
Setup: simulating spatial data and fitting a model | Quick diagnostic check | Residual diagnostics | Calibration | Null hypothesis testing | Model comparison | Quantifying inflation with borg_compare_cv() | Ranking models with borg_compare_models() | Conformal prediction | Bootstrap uncertainty | Power analysis | Per-fold performance | Diagnostic workflow | Practical guidance | When to run which diagnostic | Common pitfalls | Integration with external frameworks
Quick Start4 months ago
Why your test accuracy might be wrong | Simulating data with known dependencies | Diagnosing data dependencies | Temporal and grouped data | Working with CV folds | Exporting folds to other frameworks | Validating existing splits | Overlapping indices | Target leakage | Preprocessing leakage | Accessing risk details | The borg_check() shortcut | Fitting a model with borg_workflow() | Comparing random vs blocked CV | Power analysis after blocking | Putting it all together | Taste tests: more features | Area of Applicability | Block-permutation variable importance | Residual diagnostics | Calibration | Null test | Extrapolation detection | Geographic distance analysis | Interactive maps | S3 methods | Methods text for publications | Practical guidance | When to use BORG | When NOT to use BORG | Rules of thumb | Validation certificates | Spatial input formats | Function reference | Core | Evaluation | Spatial analysis | Feature selection and importance | Reporting | Simulation | Next steps | References
Spatial Cross-Validation4 months ago
Introduction | The problem: spatial autocorrelation | Simulating spatial data | Spatial block cross-validation | Block size optimization | Alternative spatial CV strategies | Environmental blocking | Leave-disc-out (buffered spatial CV) | Buffered leave-one-out | Spatial+ CV | KNNDM | Distance distribution matching | Comparing random vs blocked CV | Practical guidance | Choosing a spatial CV strategy | Rules of thumb | When NOT to use spatial CV | A practical workflow | References
Quick Start4 months ago
Your first mesh | Controlling mesh density | Getting FEM matrices | Using a formula interface | Mesh quality | Ruppert refinement | Next steps
Spatial Workflows4 months ago
Custom boundaries | sf polygon boundaries | Polygons with holes | Barrier models | Mesh subdivision | Adaptive refinement | Mesh operations | Extract submesh | Find disconnected components | Converting from fmesher
Spherical and Temporal Meshes4 months ago
Spherical meshes | FEM on the sphere | Projection with lon/lat coordinates | Earth-radius meshes | Euler characteristic | 1D temporal meshes | 1D FEM properties | Irregular time spacing | Metric graph meshes | Junction detection | FEM on graphs | Subdividing long edges | sf LINESTRING input | Non-stationary FEM | P2 quadratic elements | Parallel FEM assembly
H3 Grid Support5 months ago
What is H3? | Getting Started | Choosing Resolution by Area | Grid Generation | Rectangular Region | Clipping to a Boundary | Hierarchical Navigation | Parents | Children | Visualizing the Hierarchy | Working with H3 Data | ISEA--H3 Crosswalk | ISEA vs H3: When to Use Which | Resolution Reference | See Also
Design Philosophy5 months ago
The Flat-File Reality | Detection, Not Enforcement | Boundary Checks | Strict Enforcement | What keyed Doesn't Do | Summary
Quick Start5 months ago
The Problem: Silent Data Corruption | The Solution: Make Assumptions Explicit | Workflow 1: Monthly Data Validation | Define validation function | Keys survive transformations | Strict enforcement | Workflow 2: Safe Joins | Create sample data | Diagnose before joining | Compare key structures | Workflow 3: Row Identity Tracking | Add row IDs | IDs survive transformations | Combining data with ID handling | Workflow 4: Drift Detection | Commit a reference snapshot | Check for drift | Detect changes | Row-level diff | Cleanup | Quick Reference | Core Functions | Assumption Checks | Diagnostics | Row Identity | Drift Detection | When to Use Something Else | See Also
Quick Start6 months ago
Overview | Getting Started | From a Dataframe | From sf Objects | Austria Example | Basic Usage with Custom Polygons | Multiple Supports | Using a Mask (Coastlines) | Real-World Example: Portugal | Scale Parameter | Area Parameter (Target Halo Area) | Adaptive Expansion with aoe_expand() | Balanced Sampling with aoe_sample() | Border Classification with aoe_border() | Area-Based Border Zones | Sampling from Border Results | Diagnostics | Summary
Theory6 months ago
What AoE is Not | The Problem: Border Truncation | The Area of Effect | Core and Halo Classification | The Scale Parameter | Why Equal Area is the Default | The Symmetry Argument | The Information-Theoretic View | The Geometric Inevitability | When to Override | Method: Buffer vs Stamp | Buffer Method (Default) | Stamp Method (Alternative) | Hard vs Soft Boundaries | Multiple Supports | Summary