weltby Ergodic Sign inGet started
All use cases

What Will This Yacht's Resistance Be?

Given a hull's shape and speed, how much will the water push back? Testing every design in a tank is slow and expensive, so engineers want a number they can trust before the test. The same pattern fits any measurement you'd like to predict from a few hundred rows: a yield, a delivery time, a price.

Use caseEngineeringPrediction

The table

Yacht Hydrodynamics has 308 tank tests. Six columns describe the hull and its speed, and the seventh, Residuary.resistance, is the number to predict. It's in Welt's research catalogue, so you can load it in one line.

Walkthrough

  1. Load the table

    Search the research catalogue and load the table into a DataFrame.

    from welt import Client
    
    with Client() as client:
        page = client.research_datasets(q="yacht", availability="available", limit=5)
        yachts = client.load_research_dataset(page["items"][0]["id"])
  2. Hold some rows back

    Keep 30% of the tests aside, so you can check the predictions against real measurements.

    from sklearn.model_selection import train_test_split
    
    target = "Residuary.resistance"
    train, test = train_test_split(yachts, test_size=0.3, random_state=9)
  3. Predict and check

    Fit on the training rows and predict the held-back ones. There's nothing to tune.

    from welt import Regressor
    from sklearn.metrics import mean_absolute_error
    
    model = Regressor(model="tabicl-v2", random_state=9)
    model.fit(train, target=target)
    predictions = model.predict(test.drop(columns=target))
    print("Average error:", mean_absolute_error(test[target], predictions))

What you get

A prediction for every new designEach one comes back in the same units as the measurement.
An honest error figureThe average error on rows the model never saw tells you how far to trust it.
A model you can reuseThe fitted predictor stays in your workspace, so tomorrow's designs need no refit.

Try it

Use Open with to run the regression notebook in Colab, Kaggle or Jupyter, or run the code above after pip install "welt-client[parquet]" scikit-learn.