<jupyter_start><jupyter_text>Can you guess the number?            ..  ..  ..  ..  Data science    How your brain recognized the pattern? >  Thanks primary school  Multiplication table>  2 2 za 4>  3 2 za 6>  4 2 za 8>  5 2 za 10  Concept of multiplication  Your learning was overfittedIt's not 'za'>  2 two's are 4>  3 two's are 6>  4 two's are 8>  5 two's are 10  Solving this using computers  1. Traditional Programming Approach```python>> double(5)     10```  2. Let's wear the data science hat      ![](images/mlvsprogramming.png)  Steps  1. Prepare data to teach  Input<jupyter_code>import numpy as np

x = np.arange(1, 5).reshape(-1, 1)
x<jupyter_output><empty_output><jupyter_text>Output<jupyter_code>y = 2*x
y<jupyter_output><empty_output><jupyter_text>2. Decide model to use- Classification- Regression- Clustering- Recommendation- Association Rule Learning<jupyter_code>from sklearn.linear_model import LinearRegression

model = LinearRegression()<jupyter_output><empty_output><jupyter_text>3. Train model<jupyter_code>model.fit(x, y)<jupyter_output><empty_output><jupyter_text>What's happening?<jupyter_code>model.coef_, model.intercept_<jupyter_output><empty_output><jupyter_text>4. Test Model<jupyter_code>model.predict(5)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10513833992094862, 'fraction_numerical': 0.02924901185770751, 'mean_word_length': 5.298507462686567, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '552301', 'license': 'MIT', 'n_tokens_mistral': 480, 'n_tokens_neox': 437, 'n_words': 117, 'path': 'data-science-in-the-cloud/intro-data-science/intro-data-science.ipynb', 'repo_name': 'amitness/talks', 'size': '1265'}