How Bayanii turns a spreadsheet into a model
You upload a CSV and pick the column you want to predict. Bayanii checks the data, prepares it carefully, trains and compares a lineup of models, and hands back the best one with a scorecard that shows how it was chosen — no code.
The short version
Four stages take you from a raw file to a model you can use. No machine-learning background needed.
1. You set it up
Upload a CSV and choose the column to predict. Bayanii works out whether it is a number, a category, or a value that changes over time.
2. Bayanii checks the data
Around thirty automatic checks catch problems — too few rows, leaks, broken dates — before any training starts.
3. It trains and compares
Seven model families train in parallel for each task — on large datasets, which train on a GPU, a neural network joins in — and each is scored by cross-validation so the result is not a lucky guess.
4. You get the winner, explained
The best model is saved with a model card that shows how it was picked and how it scored.
Inside the pipeline
Each stage below is a real step of what happens after you click Train. Select any stage to jump to its explanation.
The diagram is illustrative — the exact behavior adapts to your dataset.
Under the hood
How does Bayanii know what kind of problem this is?
Bayanii works with three kinds of problems, and routes your data based on the column you choose to predict and its type:
- Regression — predicting a number, like price or demand.
- Classification — predicting a category, like churn yes/no.
- Forecasting — predicting future values of something measured over time.
Forecasting is treated as its own kind of problem, not regression with a date column. The rows are kept in time order and never shuffled, and the model predicts forward from past values — because in a time series, when something happened is part of the signal. Regression and classification, by contrast, treat each row as independent.
What does Bayanii check before it trains anything?
Before any model is trained, the dataset goes through around thirty automatic checks. The idea is simple: a model that scores well by copying the answer is worse than one that admits the data is not ready. Each issue lands in one of three buckets.
Some problems mean the result could not be trusted, so Bayanii stops and explains why: the target has only one value; a feature is effectively a copy of the target (a leak); there is too little data to validate (fewer than 20 distinct rows for regression, or a category with fewer than 10 examples); more than 500 categories in the target; or the job would likely run out of memory. For forecasting: no usable date column, a frequency that cannot be inferred, fewer than 100 observations, or a horizon longer than 24 steps.
Empty, constant, ID-like, and duplicate columns are dropped. So is a column missing more than 30 percent of its values (a forecast keeps it up to 60 percent); smaller gaps are filled in. When one category makes up less than ten percent of the data, Bayanii switches on balanced class weights and stratified splitting so the rare class is not ignored.
Highly correlated features, Arabic text, a heavily skewed target, duplicate rows and seasonality hints are surfaced for you to judge — Bayanii does not change them behind your back. Columns that mix numbers with text, and date columns, are handled automatically, and the report says what was done.
A couple of details worth naming: an ID-like column is caught by being unique on every row and steadily increasing, and Arabic-Indic digits are recognised and converted when Bayanii reads numbers and dates.
How does Bayanii prepare the data — without cheating?
There is one rule the whole preparation step follows: every transformation is learned from the training data only, then applied to the held-out and future data. This keeps the score honest, because the model never gets a peek at the data it will be graded on.
- Rows with a missing target are dropped before the split; remaining gaps are filled in (the middle value for numbers, the most common value for categories).
- Column types are cleaned up — a column counts as numeric when at least seventy percent of its values parse as numbers (currency symbols and stray text are stripped, Arabic-Indic digits converted); otherwise it is treated as a category.
- Categories are encoded: one-hot for up to ten distinct values, frequency encoding above that. For classification, the target is label-encoded.
- When there are more than ten features, an adaptive step selects the most useful ones — the method depends on how many features and rows you have — and is fit on training data only.
- Regression and classification hold out a share of the rows with a fixed seed, so results are reproducible: 20 percent by default, more on small datasets (25 percent below 500 rows, 30 percent below 100), or the share you pick in step 4. Forecasting holds out the most recent rows, in time order.
Why standardize the numbers?
Numeric features are put on a common scale (centered and scaled by their spread). Linear and distance-based models can only weigh features fairly when those features share a scale; tree-based models are not affected by scale, so for them it is simply neutral. Rather than search for the perfect scaler on every run for a marginal gain, Bayanii standardizes once and moves on.
How are the models trained and compared?
For each task, seven model families are trained in parallel, so you do not have to pick one. You can: the last step of the wizard also trains a single family, or a head-to-head between the ones you choose. Large datasets train on a GPU instead: there a neural network joins the lineup, and the two families with no GPU version (Extra Trees and HistGradientBoosting) sit a full run out:
Each model is scored by cross-validation — repeated five-fold for regression and classification, so the score is an average across many splits rather than one lucky one. Forecasting uses time-ordered backtesting that respects chronology, then refits the chosen model on the full history. For forecasting, each model family is wrapped in a recursive forecaster that predicts one step at a time using its own recent predictions.
The metrics depend on the task: regression reports R², RMSE and MAE; classification reports accuracy, precision, recall, F1 and a confusion matrix; forecasting reports MAE, RMSE and MAPE. Imbalanced categories are handled with balanced class weights rather than throwing data away.
How does Bayanii pick the winner?
Every model gets a single composite score between 0 and 1 (higher is better) that blends the task's metrics into one comparable number — so a balanced model is rewarded over one that is strong on a single metric and weak elsewhere.
Models that finish within a small margin of the leader — effectively a tie — get a budget-aware hyperparameter search. The search size is set by how much time is left before the job's deadline, and it is skipped gracefully if there is no time, no settings to tune, or it errors out. The tuned winner is then re-scored the same way as the rest. When you choose up to four models yourself, deep tuning searches every one of them, twice as widely; a tuned model is still kept only when it scores better than its defaults.
Finally, the winning model's metrics are recomputed on a held-out test set, on the original scale of your data — so the numbers you read are in your units, not scaled ones.
This is auditable rather than a claim: every trial is logged — which algorithm, whether it was tuned, its settings, its cross-validation scores, its composite score and timing — and that record is what fills the model card's "Model selection" and "Hyperparameters" tabs.
Show the exact formula
Regression: 0.50·R² + 0.25·(1 − RMSE/range) + 0.25·(1 − MAE/range)
Classification: 0.50·balanced accuracy + 0.50·F1(macro)
Forecasting: 0.50·(1 − MAPE) + 0.25·(1 − RMSE/range) + 0.25·(1 − MAE/range)
Error terms are turned into a 0–1 grade by comparing them to the spread of the target, and each grade is clamped so it never goes below zero. Balanced accuracy is the average recall over the classes, so always guessing the common class cannot win. These are the default weights ("Balanced"); another goal picked under "Optimize for" in step 4 shifts them.
What exactly gets saved when training finishes?
Bayanii saves the whole pipeline, not just a model. Alongside the chosen model (or, for forecasting, the forecaster and its time index) it stores every fitted step: the scaler, the encoders, the target encoder, the feature selector and the list of selected features, the polynomial step, and the imputer — plus the training-validation record behind the charts on the model card.
Why keep all of it? At prediction time, your new data has to travel through the identical steps in the identical order it did during training. A saved model on its own would not know how the data was scaled or encoded, and the results would drift.
The schema and metadata — column names, target, task type, metrics and the chosen algorithm — are versioned. Retraining on the same name creates a new version while the previous one stays available.
What does Bayanii send to the AI explanation service?
When Bayanii writes a plain-language explanation of a dataset or a model, it sends only column names and summary statistics to the AI service — never your rows, your values or your category labels. The underlying records stay put.
Training and prediction run on Bayanii's own infrastructure, separate from the explanation model. See the Privacy page.
What is Bayanii built on?
- Web app — Flask, served behind a production web server and reverse proxy, with Jinja templates and Tailwind CSS. Sign-in is handled by Firebase Auth, with CSRF protection and rate limiting on top.
- Training — runs out of band on an asynchronous job queue (Redis-backed) with a separate pool of worker processes, so the web app stays responsive while models train.
- Machine learning — pandas, NumPy, scikit-learn, XGBoost, CatBoost, skforecast and joblib.
- Storage — trained pipelines in object storage, metadata in a managed SQL database, and the job queue and live progress in Redis.
- Hosting — a multi-tier private cloud network on AWS, based in the EU.
What are Bayanii's limits?
- Bayanii is in beta — please don't upload sensitive or personal data.
- It works with tabular data only, uploaded as a CSV or Excel file — not images, free text, or audio.
- It will not invent signal that is not in your data. A clean, honest process can still conclude that your columns do not predict the target — and that is a real answer, not a failure.
- A model finds patterns and associations, not causes. A strong prediction is not proof that one thing causes another.
- Predictions are only as good as the data behind them. Quality and accuracy depend on how representative and clean your dataset is.
- Forecasting needs at least one hundred observations and supports horizons up to twenty-four steps.
- Defaults favor a fast, honest baseline over exhaustive tuning.
Have a question this page did not answer? Read the FAQ or contact us.
Ready to see what your data can do?
Create a free account and train your first model in minutes.
Start building