# Regression **Note: all keys return the same input data for this challenge.** Estimating a quantity from others is an important skill. In petrophysics, we often have missing logs, or missing samples. **Regression** is a way to predict those missing values, allowing us to make some other analysis or visualization with more data. To get the data for this challenge, you need to provide a key, but it can be empty (or anything at all) because the input is always the same: ``` params = {'key': ''} ``` The data we have is a CSV and the first few rows (samples or records) looks like this: ``` Vp [m/s],Vs [m/s] 3269.40,1966.80 3794.00,2074.00 2238.85,817.91 3377.00,1490.00 3734.34,2404.42 5216.54,3123.36 5216.54,2795.28 ``` The first column (the independent variable, or predictor) represents P-wave sonic velocity mesurements from core plugs, and the second column (the dependent variable, or response) represents S-wave velocities from the same samples; both measurements are in units of m/s. We would like to predict the S-wave velocities from the P-wave. In the language of machine learning, the first column will be `x` and the second will be `y`. Some of the rows only have the predictor variable: the response is missing. These are the samples you must make predictions for. For this challenge, you will be sending a 1D NumPy array or list of floats to the server as `answer`. You do not need to provide a question number (it will be ignored if you do): ``` params = { 'answer': y_pred } ``` ## A quick reminder how this works This document is formatted in [Markdown](https://daringfireball.net/projects/markdown/). You can retrieve your data, which is always a string, by choosing a **``** (also a string). This ensures that you have different data from other people, so be creative. ``` url = 'https://kata.scienxlab.org/challenge/regression' params = { 'key': # Replace with your own string. } r = requests.get(url, params) r.text ``` To answer question 1, change the `params`: ``` params = { 'key': , # Use the same key you used to get your input. 'question': 1, 'answer': 1234 # Your answer; can be a float, int, list or array; # the challenge description will tell you which. } ``` To get a hint for a question, provide the question number but no answer: ``` params = { 'question': 1, } ``` [Complete instructions at kata.scienxlab.org](https://kata.scienxlab.org/challenge) [An example notebook to get you started](https://gist.github.com/kwinkunks/50f11dac6ab7ff8c3e6c7b34536501a2) ---- © 2024 [Scienxlab](https://scienxlab.org/) — Code: openly licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) — Text: openly licensed under [CC BY](https://creativecommons.org/licenses/by/4.0/).