2

Would try to answer based on experience and understandings of parallel computing in production for DS/ML models: Answer to your questions as high level: Does the simple program above give you better performance with increasing n_jobs when you run it? answer: Yes and can be seen bellow in results. On what OS / setup? answer: OS:ubuntu, 2xCPUsx16Cores+...


2

When I ran your script, I got the same impression, that n_jobs was hurting you performance. However, you have to consider that parallelizing the cross-validation would only benefit if you have more data samples. With few data, the communication overhead indeed is more expensive than the processing cost involved on the task. I tried your script with more ...


2

When we implement penalized regression models we are saying that we are going to add a penalty to the sum of the squared errors. Recall that the sum of squared errors is the following and that we are trying to minimize this value with Least Squares Regression: $$SSE = \sum_{i=1}^{n}(y_i-\hat{y_i})^2$$ When the model overfits or there is collinearity present, ...


1

A linear model is in the form of: $y = a\cdot x_1 + b\cdot x_2 + c\cdot x_3.....$ Where $x_n$ is the feature and the letters a,b,c, is the coefficient. In your figure you are plotting the coefficient a,b,c... Lets say that you coefficients are $a=1$, $b=2$ and $c=10$ If you feature are $x_1=0$, $x_2=10$ and $x_3 = 1$ then your prediction will be $y = 1 \cdot ...


1

Train with relevant/non-relevant approach using sentence-transformers. When you train the model you can encode all documents and get their BERT embedding vectors. Elastic search lets you put these vectors in properties of your corpus, so each document is saved along with its embedding vector. For each query get the first 1000 candidates and their vectors ...


1

@Ethan is correct about the formulation of the lasso penalty, and I think it's particularly important to understand it in that form (for one thing, because that same penalty can work with other models like neural networks, tree models, generalized linear models, ...). But, to your question: If $\lambda=0.5$ then does it mean that those coefficients whose ...


1

Increasing tolerance will result in a "higher root mean squared error value" most of the time. Increasing tolerance is telling the model it is okay to stop earlier with higher error and not continue the search for a possibly more optimal solution using smaller updates.


1

Having profiled and stepped through sklearn´s code, I´ve got some answers. The summary: Contrary to what has been suggested, sklearn's ElasticNetCV()'s poor scalability to n_jobs is not due to: the overhead of launching threads or processes. SequentialBackend always being used irrespective of n_jobs. (I cannot reproduce this problem as stated in n1tk's ...


Only top voted, non community-wiki answers of a minimum length are eligible