<jupyter_start><jupyter_text>Computing $h_\theta(x)$ for a  list of House sizes  Matrix Vector Multiplication source = https://www.coursera.org/learn/machine-learning/lecture/aQDta/matrix-vector-multiplication Let us have a serie of house's sizes  2104  1416  1534  852 And a Hypothesis function $h_\theta(x) = -40  +0.25x$ **To Do:**  $h_\theta(x)$ for each size using matrices<jupyter_code>import numpy as np
X = np.array([[1,2104],[1,1416],[1,1534],[1,852]])<jupyter_output><empty_output><jupyter_text>**Feature Matrix**<jupyter_code>X<jupyter_output><empty_output><jupyter_text>**Theta Vector**<jupyter_code>H = np.array([[-40],[0.25]])
H<jupyter_output><empty_output><jupyter_text>**Multiply the Feature Matrix by the Hypothesis Vector** $h_\theta(x) =  \theta^T X$<jupyter_code>np.dot(M,H)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15878787878787878, 'fraction_numerical': 0.05333333333333334, 'mean_word_length': 7.515463917525773, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '197955', 'license': 'MIT', 'n_tokens_mistral': 350, 'n_tokens_neox': 321, 'n_words': 59, 'path': 'Andrew Ng - Coursera/Annexes/H(x) with matrix and vectors.ipynb', 'repo_name': 'chikoungoun/Machine-Learning', 'size': '825'}