<jupyter_start><jupyter_text><jupyter_code>nev=2*v+(-3*w)
nev
u@nev
u_norm=u/np.linalg.norm(u)
v_norm=v/np.linalg.norm(v)
w_norm=w/np.linalg.norm(w)
u_norm,v_norm,w_norm
import numpy as np

Husband_Income = np.array([100,220,140])
Wife_Income = np.array([150,200,130])
Mother_In_Law_Income = np.array([90,80,100])

Husband_Сonsumption = np.array([50,50,60])
Wife_Сonsumption = np.array([100,80,140])
Mother_In_Law_Сonsumption = np.array([100,20,140])
Inc = np.array([Husband_Income, Wife_Income, Mother_In_Law_Income])
Inc
Cons = np.array([Husband_Сonsumption, Wife_Сonsumption, Mother_In_Law_Сonsumption])
Cons
net = Inc-(Inc*0.13)
net
prof = net - Cons
prof 
matr = np.array([[1,1],[2,-1],[1,2]])
tmatr = matr.T
matr, tmatr
matr@tmatr
A = np.array([[5,-1,3,1,2], [-2,8,5,-1,1]])
x = np.array([1,2,3,4,5])
A, x
A@x
A=np.array( [ [1,9,8,5] , [3,6,3,2] , [3,3,3,3], [0,2,5,9], [4,4,1,2] ] )
B=np.array( [ [1,-1,0,1,1] , [-2,0,2,-1,1] ] )
A, B
B@A
x = np.array([1,2,1,0,4])
y = np.array([2,1,-1,1,0])
z = np.array([-1,1,-1,0,0])
x,y,z
A=np.matrix([[1,2,1,0,4],[ 2,1,-1,1,0],[-1,1,-1,0,0]])
A, A.T
A@A.T
Count_DF = pd.DataFrame({'Женские стрижки': [10, 2, 12, 4, 6, 10, 22, 7], 
                         'Мужские стрижки': [5, 21, 12, 8, 25, 3, 1, 0], 
                         'Окрашивания':[12, 3, 0, 18, 27, 2, 4, 31],
                         'Укладка':[15, 25, 30, 14, 25, 17, 25, 31],
                         'Уход':[10, 6, 4, 5, 18, 12, 20, 28]
                        }, 
                        index=['Аня', 'Борис', 'Вика', 'Галя', 'Дима', 'Егор', 'Женя','Юра'])
Price_DF = pd.DataFrame({'Женские стрижки': [2, 1.8, 2, 1.8, 2.5, 5, 1.1, 4.5], 
                         'Мужские стрижки': [1.5, 2.5, 2, 1.2, 3.5, 5, 1, 4], 
                         'Окрашивания':[1, 1, 0, 2.8, 2, 3, 1.5, 2.5],
                         'Укладка':[0.8, 1, 0.5, 0.8, 1, 2, 0.5, 1],
                         'Уход':[1, 1, 2, 2, 1.5, 2.5, 1.7, 2] 
                        }, 
                        index=['Аня', 'Борис', 'Вика', 'Галя', 'Дима', 'Егор', 'Женя','Юра'])
Count_DF
Price_DF
Profit_DF=Price_DF*Count_DF
Profit_DF
Profit_DF.values[1]
com = [0.2, 0.2, 0.3, 0.1, 0.1]
SaloonCom_DF = <EMAIL>
SaloonCom_DF.values
Profit_DF.sum(axis=1).values-SaloonCom_DF.values
A = np.matrix([[1,2],[2,5]])
A
np.linalg.inv(A)
A=np.matrix([[1,2],[1,1]])
B=np.matrix([[5,-2],[-1,4]])
A,B
A+B
A=np.matrix([[2,0,0],[0,1,0],[0,0,4]])
A
np.linalg.det(A)
A1 = np.linalg.inv(A)
np.linalg.det(A1)
A = np.matrix([[1,0,3,5],[0,4,5,5],[0,0,0,0],[0,0,0,0]])
B = np.matrix([[1,0,3,5],[0,4,5,5],[0,0,0,4],[0,0,0,0]])
A, B
np.linalg.matrix_rank(A)
np.linalg.matrix_rank(B)
A=np.array( [[ 8 , 6 ,11],[ 7 , 5 , 9],[ 6 ,10,  6]])
A
np.linalg.inv(A)
v1 = np.array([9, 10, 7, 7, 9])
v2 = np.array([2, 0, 5, 1, 4])
v3 = np.array([4, 0, 0, 4, 1])
v4 = np.array([3, -4, 3, -1, -4])
A = np.matrix([v1,v2,v3,v4])
A
np.linalg.matrix_rank(A)
A_GR = A@A.T
A_GR
np.linalg.det(A_GR)
np.linalg.inv(A_GR)
A = np.matrix([[-2,7],[3,5]])
np.linalg.det(A)
B = np.matrix([[2,0,5],[1,3,16],[0,-1,10]])
np.linalg.det(B)
C = np.matrix([[2,-1],[-1,2]])
C
A = np.matrix([[1,2,1],[2,5,6],[3,8,10]])
A
np.linalg.det(A)
A1 = np.matrix([[3,2,1],[1,5,6],[1,8,10]])
A1
np.linalg.det(A1)
A2 = np.matrix([[1,3,1],[2,1,6],[3,1,10]])
A2
np.linalg.det(A2)
A3 = np.matrix([[1,2,3],[2,5,1],[3,8,1]])
A3
np.linalg.det(A3)
A = np.matrix([[2,3,0],[3,4,0],[7,8,-4]])
A
np.linalg.det(A)
B = np.matrix([[2,3,0,2,3],[3,4,0,3,4],[7,8,-4,7,8]])
B
((2*4*-4)+(3*0*7)+(0*3*8))-((3*3*-4)+(2*0*8)+(0*4*7))
A = np.matrix([[4,7],[5,10]])
A
A1 = np.linalg.inv(A)
A1.T
V = np.array([20,30])
V
V*A1.T
A = np.matrix([[1,5],[2,1],[1,1]])
A, A.T
w = np.matrix([[1,1]])
w
b = w*A.T
b
b1 = np.matrix([[1,2,2]])
b1
b1-b, b-b1<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.28902503995737877, 'fraction_numerical': 0.1329248801278636, 'mean_word_length': 3.3969555035128804, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '551774', 'license': 'MIT', 'n_tokens_mistral': 2296, 'n_tokens_neox': 2106, 'n_words': 323, 'path': 'DATA_ANALYST/MATH&STAT-1/math1-notebook.ipynb', 'repo_name': 'stuit/I-am-data-scientist', 'size': '3760'}