машинное-обучение

NumPy: creating a two-dimensional array

I just started learning NumPy. I want to clarify: b = np.array([[1.5, 2, 3], [4, 5, 6]]) This is creating a two-dimensional array, where b[0][0] = 1.5, b[1][0] = 4, etc.?

cross validation

Program code, cross-validation is considered a bit wrong, help fix import numpy as np from pandas import DataFrame import pa ... st[:9]) The answer is always only this total {'AdaBoostClassifier': 1.0} Original selection https://ru.files.fm/u/aempdy95

Applicability of Ridge regression in regression problems

I ran into a problem related to Ridge regression. As you know, Ridge regression is used in the case of strong conditionality ... t for any parameters lmbd Ridge regression gives a worse result than standard linear regression. What leads to this result?

Test and training sample

How do I set the matrix Y_train and Y_test? And how to get rid of NaN? churn_result = churn_df['TRG_is_churn'] churn_result y = np.where(churn_result == 'True.',1,0) Returns an error: TypeError: invalid type comparison

Text classifier by speech style

Hello. The task is to develop a text classifier based on the style of speech (artistic, journalistic, etc.). It is necessary ... ate the source text into a vector of characteristics that the classifier will eventually work with. How can this be done?

Why using the principal component method, when applying the constructed transformation to the source data, negative values are obtained?

Data with a dimension of 374 rows x 31 columns is given. The first column is the date, the other columns are the share prices ... atrix is obtained with nan. Why is it that after applying the trained model to X, a matrix with negative values is obtained?

The concept of "conceptual data model of the subject area". How to understand this?

I'm writing my thesis. When defending a thesis, you also need a presentation. To the requirements of this presentation, I see ... tual domain data model in my case? I don't quite understand what this concept means. What does it actually need to describe?

Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2

I constantly get the following error in the Jupiter Notebook console window: 2018-05-31 16:39:04.994528: I tensorflow/core/p ... not compiled to use: AVX AVX2 How to use the ability to execute instructions in TF installed via the Anaconda distribution ?

IndexError: too many indices for array

Please help me I can't understand what exactly I'm doing wrong, I think the error is stupid, but I don't have enough knowledg ... f.fit(X_train, y_train) clf.score(X_test, y_test) clf.predict(X_test) print ('AdaBoostClassifier:\n', X_test[:9]) Error

Calculation of the Pearson correlation coefficient

There are two files/frames. I want to make a correlation. import numpy as np import pandas as pd from sklearn.decomposition ... int (c) Receive: ----> c = np.corrcoef(t[:0], dj[:0])[0,1] IndexError: index 0 is out of bounds for axis 0 with size 0

Unknown label type: 'continuous' error when training kNN

I'm teaching the nearest neighbor method. On a regular DataFrame of attributes, everything works well. But, when I scale the ... label type: %r" % y_type) 172 173 What can this be related to? ValueError: Unknown label type: 'continuous'

What does the random state parameter in sklearn.manifest mean?TSNE and other SciKit-Learn classes?

Put 3 different values random_state, this is: (None, 0, 1). I did not understand what the essence of this method is. I read the documentation, the answer on the site, but I did not understand.

Python differences between the methods of the score regression model and the r2 score function

When building the model, I wanted to compare the values of r2_score () - the coefficient of determination, which I did, but w ... coefficient of determination R^2 of the prediction. Does the score() method also return the coefficient of determination?

Error Found input variables with inconsistent numbers of samples

Teaching RandomRorest- Here is the code: X_train, X_test, y_train, y_test = train_test_split(X, y, ... n: y_test.shape - (3001,) RFC.predict_proba(X_test).shape - (3001, 2) Maybe the problem is in the dimension of the matrices?

What do the numbers in the "embedding" word vector mean?

Let's say there is an" embedding " vector of the word Watermelon = [-0.0415, -0.0079, -0.0261, ... 0.1022]. What do the numbe ... arison is made. However, I did not find this information anywhere. I am interested in exactly how these numbers are obtained!