End-to-end LightGBM fraud detection pipeline built as an R package, orchestrated by targets with data stored in MinIO via Apache Arrow. Includes 6-layer Lakehouse architecture, class imbalance tournament, formally tuned hyperparameters (PR-AUC 0.198), and Quarto RevealJS slides. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
42 lines
1.4 KiB
R
42 lines
1.4 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/functions.R
|
|
\name{convert_to_parquet}
|
|
\alias{convert_to_parquet}
|
|
\title{Convert BAF CSV to partitioned Parquet in MinIO (S3)}
|
|
\usage{
|
|
convert_to_parquet(from_prefix, to_prefix, bucket_name = "baf-fraud")
|
|
}
|
|
\arguments{
|
|
\item{from_prefix}{Character. Prefix/key under the bucket containing CSVs (e.g. \code{"01_raw"}).}
|
|
|
|
\item{to_prefix}{Character. Prefix/key under the bucket to write Parquet dataset (e.g. \code{"02_intermediate"}).}
|
|
|
|
\item{bucket_name}{Character. Bucket name. Default \code{"baf-fraud"}.}
|
|
}
|
|
\value{
|
|
A character string giving the destination dataset prefix (typically \code{to_prefix}).
|
|
}
|
|
\description{
|
|
Reads \code{Base.csv} from a MinIO/S3 bucket prefix (e.g., \code{"01_raw"}) and writes a
|
|
Hive-style partitioned Parquet dataset to another prefix (e.g., \code{"02_intermediate"}),
|
|
partitioned by \code{variant} (e.g., \verb{variant=Base/part-*.parquet}).
|
|
}
|
|
\details{
|
|
Connection settings are taken from environment variables:
|
|
\itemize{
|
|
\item \code{BAF_ENDPOINT} (e.g. \code{"minio:9000"} or \code{"192.168.4.xx:9000"})
|
|
\item \code{BAF_KEY} (MinIO access key)
|
|
\item \code{BAF_SECRET} (MinIO secret key)
|
|
}
|
|
}
|
|
\examples{
|
|
\dontrun{
|
|
Sys.setenv(
|
|
BAF_ENDPOINT = "minio:9000",
|
|
BAF_KEY = "YOUR_ACCESS_KEY",
|
|
BAF_SECRET = "YOUR_SECRET_KEY"
|
|
)
|
|
convert_to_parquet(from_prefix = "01_raw", to_prefix = "02_intermediate", bucket_name = "baf-fraud")
|
|
}
|
|
}
|