Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have this optimization problem and I wonder any function in any python library can solve it? Say I want to minimize f(x) by gradient descent. x is a vector of say 3 dimensions, x=(x1,x2,x3). The constraint is x1>0, x2>0, x3>0, and x1+x2+x3=1. Any function can solve this constrained gradient descent? Thank you.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
right now I'm looking for an sklearn method that does something like:
arr = [13,15,41,45,90,100]
print(KMeans.num_clusters(arr))
Outputs 3
You can use mean-shift clustering. It does not require number of clusters beforehand. However, the drawback of mean shift is that it is not very efficient compared to the k-means. Since your example array is only 1 dimensional it should not be a problem. If you are going to use mean-shift with 2 or more dimensional data, be careful with the curse of dimensionality.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am looking for a python package that supports Monte Carlo Cross Validation (Repeated random sub-sampling validation). SkLearn has k-fold, but this will not allow me to specify the ratio of training/testing.
I have seen a package in R that will supposedly achieve this (Caret), but is there an equivalent for python?
The package you're after is in fact available in Scikit learn, but is called ShuffleSplit.
Check also the user guide here, where the function is referred to as Random permutations cross-validation.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there an analog for Python sklearn.ensemble.GradientBoostingClassifier in R language?
I know there are R packages for gradient boosting: gbm, mboost, TDboost, gbev, bst, etc.
But which one package, which function and with what parameters I should use to get same results, as with GradientBoostingClassifier in Python using default parameters?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Say I have a 2D point (a,b) and a line defined as y = mx + c (any alternative parameterization is fine). I would like to find the point that is symemtric to (a,b) w.r.t. to the this line.
Are there any libraries in Python that can help with this type of transformations?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am trying to implement the newton method for maximization in higher dimensions and I was wondering if there exists any solvers for this in Python? In Scipy there is a solver for the 1-dimensional case, but I do not see one for the multi-dimensional case. I suppose that it is possible to implement it using the Hessian and Gradient solvers in Numdifftools
EDIT:
It looks like scipy.optimize.minimize does this. I was looking under the multi-dimensional heading and it wasn't there, that's why I missed it. It was under the general-purpose heading
scipy.optimize.minimize does this.