<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Короче функция, которая домнажать вектор на случайную матрица!
$$X_{1\times n}R_{n\times k}=C_{1\times k}$$, где
Step1:  Вытаскивание даных из файла!
Ссылки
<ASSISTANT_TASK:>
Python Code:
def mm(x, k):
    if x.shape[0] > 1:
        x=x.T
    r = np.random.rand(x.shape[1],k)
    print(r)
    #print(x.dot(r))
    return(x.dot(r))
    
mm(np.array([[1,2, 1,132, 1,2]]), 5)
Explanation: Короче функция, которая домнажать вектор на случайную матрица!
$$X_{1\times n}R_{n\times k}=C_{1\times k}$$, где: R - рандомная матрица
$$ \begin{pmatrix}x_{11}\x_{21}\x_{31}\x_{41}\x_{51}\end{pmatrix}\begin{pmatrix}b_{11}&b_{12}&b_{13}&b_{14}\b_{21}&b_{22}&b_{23}&b_{24}\b_{31}&b_{32}&b_{33}&b_{34}\b_{41}&b_{42}&b_{43}&b_{44}\end{pmatrix} $$
https://www.latex4technics.com/
End of explanation
from sklearn.preprocessing import scale
X_train_draw = scale(X_train[::, 0:2])
X_test_draw = scale(X_test[::, 0:2])
clf = RandomForestClassifier(n_estimators=100, n_jobs=-1)
clf.fit(X_train_draw, y_train)
x_min, x_max = X_train_draw[:, 0].min() - 1, X_train_draw[:, 0].max() + 1
y_min, y_max = X_train_draw[:, 1].min() - 1, X_train_draw[:, 1].max() + 1
h = 0.02
xx, yy = np.meshgrid(np.arange(x_min, x_max, h),
            np.arange(y_min, y_max, h))
pred = clf.predict(np.c_[xx.ravel(), yy.ravel()])
pred = pred.reshape(xx.shape)
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
cmap_light = ListedColormap(['#FFAAAA', '#AAFFAA', '#AAAAFF'])
cmap_bold = ListedColormap(['#FF0000', '#00FF00', '#0000FF'])
plt.figure()
plt.pcolormesh(xx, yy, pred, cmap=cmap_light)
plt.scatter(X_train_draw[:, 0], X_train_draw[:, 1], 
            c=y_train, cmap=cmap_bold)
plt.xlim(xx.min(), xx.max())
plt.ylim(yy.min(), yy.max())
plt.title("Score: %.0f percents" % (clf.score(X_test_draw, y_test) * 100))
plt.show()
x = np.eye(1, 18)
x[0][12] = 5
print(x)
Explanation: Вытаскивание даных из файла!
Ссылки:
https://habrahabr.ru/company/wunderfund/blog/316826/
http://www.karsdorp.io/python-course/
https://docs.scipy.org/doc/numpy/reference/index.html
https://stepik.org/lesson/NumPy-%D0%BE%D1%81%D0%BD%D0%BE%D0%B2%D1%8B-16462/step/8?course=%D0%9D%D0%B5%D0%B9%D1%80%D0%BE%D0%BD%D0%BD%D1%8B%D0%B5-%D1%81%D0%B5%D1%82%D0%B8&unit=4283
End of explanation
<END_TASK>