[R] Testing optimization solvers with equality constraints

2021-05-21 Thread Hans W
Just by chance I came across the following example of minimizing a simple function (x,y,z) --> 2 (x^2 - y z) on the unit sphere, the only constraint present. I tried it with two starting points, x1 = (1,0,0) and x2 = (0,0,1). #-- Problem definition in R f = function(x) 2 * (x[1]^2

Re: [R] Testing optimization solvers with equality constraints

2021-05-21 Thread Hans W
Mark, you're right, and it's a bit embarrassing as I thought I had looked at it closely enough. This solves the problem for 'alabama::auglag()' in both cases, but NOT for * NlcOptim::solnl -- with x0 * nloptr::auglag -- both x0, x1 * Rsolnp::solnp -- with x0 *

Re: [R] Testing optimization solvers with equality constraints

2021-05-22 Thread Hans W
Yes. "*on* the unit sphere" means on the surface, as you can guess from the equality constraint. And 'auglag()' does find the minimum, so no need for a special approach. I was/am interested in why all these other good solvers get stuck, i.e., do not move away from the starting point. And how to

[R] R Redis

2021-11-28 Thread Hans W
> Have anybody used this module? > https://cran.r-project.org/web/packages/rredis/README.html > > Could share your experience please. thank you. I have successfully used this package (on Linux and macOS) and I think it is a great way of storing hashed data across different platforms and

[R] Dependency errors for package pracma

2023-11-08 Thread Hans W
I tried to update my package {pracma} on CRAN from 2.4.2 (2022-09-21) to version 2.4.4 (2023-11-08). This package reverse depends / imports / suggests on 350 packages on CRAN and 25 packages on Bioconductor. The only changes are small corrections on some help files, a new function for

Re: [R] Dependency errors for package pracma

2023-11-09 Thread Hans W
What really interests me: With all those strict checking procedures, how is it possible that the new 'Matrix' version got accepted on CRAN? I think this happened twice to me before, and it takes a lot of time to check package dependencies that turn out to be not dependent -- more time than

Re: [R] Noisy objective functions

2023-08-13 Thread Hans W
quot;SANN". See the Optimization cheatsheet I wrote with John Nash: "NOTE: CG (John is the author!) and SANN are NOT recommended." https://github.com/hwborchers/CheatSheets/blob/main/Base%20R%20Optim%20Cheatsheet.pdf Hans W. On Sun, 13 Aug 2023 at 21:28, Hans W wrote: > > While w

[R] Noisy objective functions

2023-08-13 Thread Hans W
While working on 'random walk' applications, I got interested in optimizing noisy objective functions. As an (artificial) example, the following is the Rosenbrock function, where Gaussian noise of standard deviation `sd = 0.01` is added to the function value. fn <- function(x)

[R] x[0]: Can '0' be made an allowed index in R?

2024-04-21 Thread Hans W
. Is there a library that provides this functionality? Or is there a simple trick to do this in R? The expression 'x[0]' must be possible, does this mean the syntax of R has to be twisted somehow? Thanks, Hans W. [[alternative HTML version deleted]] __ R-help@r

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-22 Thread Hans W
tps://cran.r-project.org/package=index0 > > On Sun, Apr 21, 2024, 3:56 AM Hans W wrote: >> >> As we all know, in R indices for vectors start with 1, i.e, x[0] is not a >> correct expression. Some algorithms, e.g. in graph theory or combinatorics, >> are much easier t

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-24 Thread Hans W
I hereby protest strongly against the misuse of this thread through unnecessary and pointless discussions. My request was satisfactorily answered with references to R libraries and legitimate warnings about the use of zero-based indexing schemes in R. If you want to continue the discussions,

Re: [R] calculate area between intersecting polygons

2010-10-26 Thread Hans W Borchers
jonas garcia garcia.jonas80 at googlemail.com writes: Thanks for your reply, My main issue is that I don't have any equations to generate the data, just a bunch of points, each corresponding to a polygon. I was looking in package sp and there is a function to calculate areas (

Re: [R] calculate area between intersecting polygons

2010-10-26 Thread Hans W Borchers
Remko Duursma remkoduursma at gmail.com writes: Here is a different solution: library(gpclib) p1 - as(poly1, gpc.poly) p2 - as(poly2, gpc.poly) area.poly(p2) + area.poly(p1) - area.poly(union(p1,p2)) I.e., take areas of both polygons and subtract the union (check plot(union(p1,p2))

Re: [R] Rsolnp examples

2010-10-29 Thread Hans W Borchers
Jan Theodore Galkowski bayesianlogic at acm.org writes: I'm interested in the Rsolnp package. For their primary function solnp, one example is given, and there is a reference to unit tests. Anyone know where these can be found? Also, Rsolnp is used in a few other packages (e.g.,

Re: [R] Fwd: Numerical integration

2010-11-17 Thread Hans W Borchers
Eduardo de Oliveira Horta eduardo.oliveirahorta at gmail.com writes: -- Forwarded message -- From: Eduardo de Oliveira Horta eduardo.oliveirahorta at gmail.com Date: Wed, Nov 17, 2010 at 3:59 PM Subject: Re: [R] Numerical integration To: David Winsemius dwinsemius at

Re: [R] how to find near neighbors?

2010-11-19 Thread Hans W Borchers
Czerminski, Ryszard Ryszard.Czerminski at astrazeneca.com writes: I am looking for an efficient way to find near neighbors... More specifically... I have two sets of points: A B and I want to find points in set B which are closer to set A than some cutoff (or n-closest) I will

Re: [R] question about constraint minimization

2010-11-20 Thread Hans W Borchers
dhacademic at gmail.com dhacademic at gmail.com writes: Hi, I am a beginner of R. There is a question about constraint minimization. A function, y=f(x1,x2,x3x12), needs to be minimized. There are 3 requirements for the minimization: (1) x2+x3+...+x12=1.5 (x1 is excluded); (2)

Re: [R] question about constraint minimization

2010-11-23 Thread Hans W Borchers
dhacademic at gmail.com dhacademic at gmail.com writes: Hi, I have struggled on this bound optimization with equality constraint by using optim function for two days, but still fail to prepare a good input. Can anyone help to prepare the input for my specific case? Many thanks. Best,

Re: [R] Hurst Exponent Estimation

2010-07-22 Thread Hans W Borchers
Lorenzo Isella lorenzo.isella at gmail.com writes: Dear All, I am a novice when it comes to time-series analysis and at the moment I am actually interested in calculating the Hurst exponent of a time series. Some time ago I tested some of the classical chaotic time series (such as the

Re: [R] Hurst Exponent Estimation

2010-07-22 Thread Hans W Borchers
, Hans W Borchers wrote: Lorenzo Isellalorenzo.isellaat gmail.com writes: Dear All, I am a novice when it comes to time-series analysis and at the moment I am actually interested in calculating the Hurst exponent of a time series. Some time ago I tested some of the classical chaotic

Re: [R] Optimization problem with nonlinear constraint

2010-07-28 Thread Hans W Borchers
Uli Kleinwechter u.kleinwechter at uni-hohenheim.de writes: Dear Ravi, As I've already written to you, the problem indeed is to find a solution to the transcendental equation y = x * T^(x-1), given y and T and the optimization problem below only a workaround. I don't think

Re: [R] Why use numFold in evaluate_Weka_classifier of RWeka

2010-08-10 Thread Hans W Borchers
s0300851 s0300851 at tp.edu.tw writes: Hi everyone, I have a question about using RWeka package, we know that instruction make_Weka_classifier that can help us to build a model,and evaluate_Weka_classifier instruction can help us to evaluate the performance of the model using on new

Re: [R] Games

2010-08-13 Thread Hans W Borchers
Silvano silvano at uel.br writes: Hi, I want to build the table of a football league with 11 teams. All play together. So will 55 games. Since there are an odd number of teams in each round a team will not play. The easy solution is moving around a table with one team pausing.

Re: [R] Problem to compute a function with very large numbers

2010-08-20 Thread Hans W Borchers
Nan Zhao nzhao at student.ethz.ch writes: Thank you Dennis for your explanations! The results you found are the same as mine. with first an infinity result, followed by NaN. It seems that, when the number becomes too small, R must round it up to 0. Hence I was wondering if there might a

Re: [R] Puzzle

2010-08-26 Thread Hans W Borchers
Ben Holt BHolt at bio.ku.dk writes: I have data similar to this: Location Surveyor Result A1 83 A2 76 A3 45 B1 71 B4 67 C2 23 C5 12 D3 34 E4

Re: [R] LSAP and the Hungarian algorithm [was: R-help]

2010-08-27 Thread Hans W Borchers
venkatesh bandaru venkatesh.bandaru at gmail.com writes: If you had searched for it, you would have easily found the 'clue' package: In package clue solve_LSAP() enables the user to solve the linear sum assignment problem (LSAP) using an efficient C implementation of the Hungarian

Re: [R] LSAP and the Hungarian algorithm [was: R-help]

2010-08-27 Thread Hans W Borchers
Ravi Varadhan rvaradhan at jhmi.edu writes: However, The clue package has the solve_LSAP() function (as pointed out by Hans Werner) that solves the linear sum assignment problem, but it uses the Hungarian algorithm that was requested by you. The lp.assign() function in lpSolve package (as

Re: [R] Regarding naive baysian classifier in R

2010-08-31 Thread Hans W Borchers
Vishnampettai akron_aadhithya at yahoo.com writes: Hi, I have a small doubt regarding naive Bayes. I am able to classify the data's properly but i am just stuck up with how to get the probability values for naive bayes. In the case of SVM we have attr function that helps in displaying the

Re: [R] calculating area between plot lines

2010-09-07 Thread Hans W Borchers
A. Marcia BARBOSA anamarciabarbosa at gmail.com writes: Hi everyone. I have these data: probClass-seq(0,0.9,0.1) prob1-c(0.0070,0.0911,0.1973,0.2949,0.3936,0.5030,0.5985,0.6869,0.7820,0.8822) prob2-c(0.0066,0.0791,0.2358,0.3478,0.3714,0.3860,0.6667,0.6400,0.7000,1.) # which I'm

Re: [R] optimized value worse than starting Value

2010-09-09 Thread Hans W Borchers
Barry Rowlingson b.rowlingson at lancaster.ac.uk writes: On Wed, Sep 8, 2010 at 1:35 PM, Michael Bernsteiner dethlef1 at hotmail.com wrote: Dear all, I'm optimizing a relatively simple function. Using optimize the optimized parameter value is worse than the starting. why? I would

Re: [R] bivariate vector numerical integration with infinite range

2010-09-21 Thread Hans W Borchers
baptiste auguie baptiste.auguie at googlemail.com writes: Dear list, I'm seeking some advice regarding a particular numerical integration I wish to perform. The integrand f takes two real arguments x and y and returns a vector of constant length N. The range of integration is [0,

Re: [R] bivariate vector numerical integration with infinite range

2010-09-21 Thread Hans W Borchers
baptiste auguie baptiste.auguie at googlemail.com writes: Thanks, adaptIntegrate() seems perfectly suited, I'll just need to figure a transformation rule for the infinite limit. The suggestion of x-1/x does not seem to work here because it also transforms 0 into -infinity. I think exp(pi*

Re: [R] Prime Factorization

2010-09-21 Thread Hans W Borchers
David Winsemius dwinsemius at comcast.net writes: On Sep 21, 2010, at 11:33 AM, Cliff Clive wrote: Hi everyone, I have a very quick question: Is there a ready-made function in R or any R packages to find the prime factorization of an integer? Yes. At least two. The obvious

Re: [R] bivariate vector numerical integration with infinite range

2010-09-21 Thread Hans W Borchers
baptiste auguie baptiste.auguie at googlemail.com writes: Thanks. I am having trouble getting adaptIntegrate to work with a multivalued integrand though, and cannot find a working example. Anyone had better luck with it? The function to be integrated needs a vector as input: f -

Re: [R] Prime Factorization

2010-09-21 Thread Hans W Borchers
David Winsemius dwinsemius at comcast.net writes: A further citation that answers the question I raised (and inaccurately predicted no value) regarding prime.sieve : http://finzi.psych.upenn.edu/R/Rhelp02/archive/49773.html This was found with Barons search facility set for rhelp

Re: [R] non-linear integer optimization?

2010-09-23 Thread Hans W Borchers
darckeen darckeen at hotmail.com writes: Are there any packages that do non-linear integer otimization? Looked at lpSolve but i'm pretty sure it only works with linear programming and not non-linear, tried L-BFGS-B optim after flooring all my params, works somewhat but seems really

Re: [R] non-linear integer optimization?

2010-09-23 Thread Hans W Borchers
darckeen darckeen at hotmail.com writes: This is an example of the type of problem, and how i'm currently using optim() to solve it. I would classify this as an integer programming (IP) problem, it is not even non-linear, as there are no continuous variables. Your approach with optim() will

Re: [R] constrained optimization -which package?

2010-09-29 Thread Hans W. Borchers
Leonardo Monasterio leonardo.monasterio at gmail.com writes: Dear R users, In the function bellow I want to find the maximum value of v, subject to the constrain that the sum of x is equal to 1. I want to maximize: v-t(x)%*%distance%*%x Subject to: sum(x)=1 I do not see why you

Re: [R] Hashing a set

2010-09-30 Thread Hans W Borchers
Lorenzo Isella lorenzo.isella at gmail.com writes: Dear All, I am given a time series such at, at every time t_i, I am given a set of data (every element of the set is just an integer number). What I need is an injective function able to map every set into a number (possibly an integer

Re: [R] Finding Zeros of a Function

2010-10-08 Thread Hans W Borchers
Lorenzo Isella wrote: Hello, And sorry for the late reply. You see, my problem is that it is not known a priori whether I have one or two zeros of my function in the interval where I am considering it; on top of that, does BBsolve allow me to select an interval of variation of x?

Re: [R] Finding Zeros of a Function

2010-10-08 Thread Hans W Borchers
Hans W Borchers wrote: Let's see how many zeroes are there of the function sin(1/x) in the interval [0.1, 1.0]. Can you find out by plotting? In the 1-dimensional case the simplest approach is to split into subintervals small enough to contain at most one zero and search each

Re: [R] Hash fuctions library for R?

2010-10-14 Thread Hans W Borchers
Uwe Ziegenhagen ziegenhagen at gmail.com writes: Hi, I would like to calculate various hash sums for given string but haven't found a suitable package, yet. I found tools::md5sum which works only for files, however I would like to avoid putting my string in a file before calculating the

Re: [R] Ubuntu, Revolutions, R

2009-10-05 Thread Hans W. Borchers
I updated to Ubuntu 9.10 Beta yesterday, and yes I do see the same message and I am a bit irritated. I don't want to read these 'marketing' lines any time I start up R. I simply deleted the lines from /etc/R/Rprofile.site for now, but I am still wondering who put that in. Is there any deeper

Re: [R] help using R's linprog for LP

2009-10-24 Thread Hans W Borchers
Medha Atre medha.atre at gmail.com writes: Hi, I found the reason. By default it puts a condition for x = 0. Is there a way to get rid of this condition? The constraints x = 0 are used in most linear programming realizations. Some bounds from below are needed. The trick to circumvent the

Re: [R] Implementation of the Shuffled Complex Evolution (SCE-UA) Algorithm

2009-11-11 Thread Hans W Borchers
Simon Seibert simon.seibert at mytum.de writes: Good evening list, I'm looking for an R implementation of the Shuffled Complex Evolution” (SCE-UA) algorithm after Duan et al. (1993). Does anybody know if there is an extension/ package existing that contains it? Thanks very much for your

Re: [R] best polynomial approximation

2010-05-18 Thread Hans W Borchers
I guess you may be looking for the Remez algorithm. AFAIK there is no implementation in one of the R packages. You can find FORTRAN code in the Collected Algorithms of the ACM (no. 604) which probably could be called from R. There appears to exist a discrete, equi-distant(?) version as function

Re: [R] optim or nlminb for minimization, which to believe?

2009-11-29 Thread Hans W Borchers
Your function named 'gradient' is not the correct gradient. Take as an example the following point x0, very near to the true minimum, x0 - c(-0.2517964, 0.4898680, -0.2517962, 0.4898681, 0.7500995) then you get gradient(x0) [1] -0.0372110470 0.0001816991 -0.0372102284

Re: [R] Modular inverses

2009-12-01 Thread Hans W Borchers
SJ Robson-Davis sr6827 at bristol.ac.uk writes: I want to find the inverse of an integer k mod p (prime.) Is there a function that can do this for me? I know i could simply write (k^(p-2)) %% p, but i need to do this for large primes (above 100) and this gives the warning message:

Re: [R] Solve linear program without objective function

2009-12-04 Thread Hans W Borchers
Andreas Wittmann andreas_wittmann at gmx.de writes: Dear R-users, i try to solve to following linear programm in R 0 * x_1 + 2/3 * x_2 + 1/3 * x_3 + 1/3 * x_4 = 0.3 x_1 + x_2 + x_3 + x_4 = 1 x_1, x_2, x_3, x_4 0, x_1, x_2, x_3, x_4 1 as you can see i have no objective function

Re: [R] Modula Generators

2009-12-08 Thread Hans W Borchers
Sam K upperhalfplane at yahoo.co.uk writes: Hi all, Is there function on R for calculating Modula generators? For example for primes above 100, e.g 157, i want to know which number generates the group under multiplication mod 157. i.e i want to find an element whose order is 156. The

Re: [R] Subset sum problem.

2009-12-09 Thread Hans W Borchers
Geert Janssens janssens-geert at telenet.be writes: Hi, I'm quite new to the R-project. I was suggested to look into it because I am trying to solve the Subset sum problem, which basically is: Given a set of integers and an integer s, does any non-empty subset sum to s? (See

Re: [R] Subset sum problem.

2009-12-09 Thread Hans W Borchers
Geert Janssens janssens-geert at telenet.be writes: On Wednesday 9 December 2009, Hans W Borchers wrote: Geert Janssens janssens-geert at telenet.be writes: [ ... ] Has anybody tackled this issue before in R ? If so, I would be very grateful if you could share your solution with me

Re: [R] how to count the total number of (INCLUDING overl apping) occurrences of a substring within a string ?

2009-12-20 Thread Hans W Borchers
Gabor Grothendieck ggrothendieck at gmail.com writes: Use a zero lookaround expression. It will not consume its match. See ?regexp gregexpr(a(?=a), aaa, perl = TRUE) [[1]] [1] 1 2 attr(,match.length) [1] 1 1 I wonder how you would count the number of occurrences of, for example,

Re: [R] how to count the total number of (INCLUDING overl apping) occurrences of a substring within a string ?

2009-12-20 Thread Hans W Borchers
Hans Werner Correction: I meant the '\G' metacharacter in Perl, not a modifier. On Sun, Dec 20, 2009 at 7:22 AM, Hans W Borchers hwborchers at googlemail.com wrote: Gabor Grothendieck ggrothendieck at gmail.com writes: [Sorry; Gmane forces me to delete more quoted text

Re: [R] logarithmic integrals in R?

2010-05-29 Thread Hans W. Borchers
Oliver Kullmann O.Kullmann at swansea.ac.uk writes: Hello, I couldn't find information on whether the logarithmic integrals Li_m(x) = integral_0^x log(t)^(-m) dt for x = 0 are available in R? I saw your request only this weekend. The first logarithmic integral can be computed using

Re: [R] logarithmic integrals in R?

2010-05-30 Thread Hans W. Borchers
. I am certain I 've seen them in AandS' handbook (where else?), but sure cannot remember in which chapter or page. Which logarithmic integrals do you really need, and on what range? Regards, Hans Werner On Sat, May 29, 2010 at 01:15:29PM +, Hans W. Borchers wrote: Oliver Kullmann

Re: [R] double integral

2010-06-18 Thread Hans W Borchers
suman dhara suman.dhara89 at gmail.com writes: Sir, I want to calculate double integral in R. Is there any function to do this? If your domain of integration is a hypercube, try packages 'cubature' or 'R2cuba'. Otherwise, you have to uncover more information about your specific problem

Re: [R] Double Integration

2010-07-01 Thread Hans W Borchers
Sarah Sanchez sarah_sanchez09 at yahoo.com writes: Dear R helpers I am working on the Bi-variate Normal distribution probabilities. I need to double integrate the following function (actually simplified form of bivariate normal distribution) f(x, y) = exp [ - 0.549451 * (x^2 + y^2 - 0.6

Re: [R] Double Integration

2010-07-03 Thread Hans W Borchers
Bogaso Christofer bogaso.christofer at gmail.com writes: Hi Ravi, your suggestion helped me as well a lot. If I look into that function, I see this function is calling another function : .Call(doCubature, as.integer(fDim), body(f.check), as.double(lowerLimit),

Re: [R] optimization problem

2010-01-17 Thread Hans W. Borchers
Ravi Varadhan rvaradhan at jhmi.edu writes: Interesting! Now, if I change the cost matrix, D, in the LSAP formulation slightly such that it is quadratic, it finds the best solution to your example: Dear Ravi, I thought your solution is ingenious, but after the discussion with Erwin

Re: [R] optimization problem

2010-01-17 Thread Hans W. Borchers
Ravi Varadhan rvaradhan at jhmi.edu writes: Dear Hans, I agree with your comments. My intuition was that the quadratic form would be better behaved than the radical form (less nonlinear!?). So, I was hoping to see a change in behavior when the cost function was altered from a radical

Re: [R] problem with the precision of numbers

2010-01-19 Thread Hans W Borchers
Ted.Harding at manchester.ac.uk writes: [...] I suspect this is an invented computation -- the 3456 strikes me as unlikely (it reminds me of my habitual illustrative use of set.seed(54321)). There is a definite problem with the development given by kayj. When k=2000 and i=k, the

Re: [R] problem with the precision of numbers

2010-01-25 Thread Hans W Borchers
kayj kjaja27 at yahoo.com writes: Hi All, thank you all for your help. I have tried Bill's script and it works! so I am trying to think what was the problem and it looks like it i sthe precision. so you defined a function of the precision and evaluates at precision=500. Bill, I was

Re: [R] Solving an optimization problem: selecting an quot;optimalquot; subset

2010-01-30 Thread Hans W Borchers
Dimitri Shvorob dimitri.shvorob at gmail.com writes: Is it a subset of a vector containing 100 elements, or 1ths? I need to pick 2-40 elements out of a 50-200-element-long vector. A random number of elements that should be chosen, or the best 10 values which sums up to a defined

Re: [R] Solving an optimization problem: selecting an quot;optimalquot; subset

2010-01-30 Thread Hans W Borchers
Dimitri Shvorob dimitri.shvorob at gmail.com writes: This is a subset sum problem and has been discussed here in December Thanks a lot! Will investigate. Can you settle for an approximate solution? Absolutely. You can use the script from the thread subset sum problem to find

Re: [R] Solving an optimization problem: selecting an optimal subset

2010-01-31 Thread Hans W Borchers
Dimitri Shvorob wrote: Same request to Hans: I am afraid I need a little more spoon-feeding following I sent a GAMS script modeling this problem to the NEOS solvers Thanks a lot! If you have access to CPLEX (I mean the commercial program, not Rcplex which is just an interface to

Re: [R] Solving an optimization problem: selecting an quot;optimalquot; subset

2010-02-01 Thread Hans W Borchers
Dimitri Shvorob dimitri.shvorob at gmail.com writes: Given vector of numbers x, I wish to select an n-subset with sum closest fixed value s. Can anyone advise me how to approach this, in R? I have considered Rcplex package, which handles integer/binary linear/quadratic optimization

Re: [R] Solving an optimization problem: selecting an quot; optimalquot; subset

2010-02-02 Thread Hans W Borchers
Erwin Kalvelagen-2 wrote: Hans W Borchers hwborchers at googlemail.com writes: # Prepare inputs for MILP solver obj - c(rep(0, n), 0, 1, 1, 0) typ - c(rep(B, n), B, C, C, B) mat - matrix(c(s, -z, -1, 1, 0,# a = a_p + a_m rep(0, n), 1, 0, 0

Re: [R] Sorting

2010-02-06 Thread Hans W Borchers
David Neu david at davidneu.com writes: Hi, I have a list of vectors (of varying lengths). I'd like to sort this list by applying a function to each pair of vectors in the list and returning information to sorting routine that let's it know which one is larger. To solve problems like

Re: [R] Sorting

2010-02-06 Thread Hans W Borchers
David Neu david at davidneu.com writes: David Neu david at davidneu.com writes: Hi, I have a list of vectors (of varying lengths).  I'd like to sort this list by applying a function to each pair of vectors in the list and returning information to sorting routine that let's it know which

Re: [R] convex optimization package for R, specifically semidefinite programming

2007-11-15 Thread Hans W Borchers
Hi there, I do assume you are talking about the CVXOPT (and CVXMOD) Python package(s). Please note that CVXOPT only contains _interfaces_ to the solvers in MOSEK, because these are commercial products (as Roger Koenker already has mentioned). There appear to be some Python/Scipy-based solvers

Re: [R] Optimization with constraint.

2008-03-14 Thread Hans W Borchers
Andreas Klein klein82517 at yahoo.de writes: Hello. I have some problems, when I try to model an optimization problem with some constraints. The original problem cannot be solved analytically, so I have to use routines like Simulated Annealing or Sequential Quadric Programming. But

[R] R Code and the Pygments Python SyntaxHighlighter

2008-03-27 Thread Hans W. Borchers
Dear R Help, is someone going to write a R/S language lexer for the Pygments Python syntax highlighter http://pygments.org/? As it is used now by Trac, Django, or the Python documentation tool Sphinx, the R community can apply it in Python-based Wikis like Moinmoin and others. Hans Werner

Re: [R] DE optimization with equality constraint

2008-03-31 Thread Hans W. Borchers
Paul Smith phhs80 at gmail.com writes: The problem with DEoptim approach is that is not guaranteed that it converges to the solution. Moreover, from my experience, it seems to be quite slow when the optimization problem is high-dimensional (i.e., with many variables). Paul There is a

[R] Applying rbind() to a sequence of data frame names

2008-04-01 Thread Hans W. Borchers
I have a set of data frames ds1, ds2, ... each having the same columns and column names: ds1 - data.frame(x=c(1,2,3,4), y=c(5,6,7,8)) ds1 - data.frame(x=c(9,10,11,12), y=c(13,14,15,16)) ... and I would like to combine them into just one data frame like ds - rbind(ds1, ds2, ...) Because

Re: [R] Optimization and Linear Programming in R

2009-06-26 Thread Hans W Borchers
Chris.Wilcox at csiro.au writes: Dear List, [...] We are looking for a solver that can deal with this nonlinear integer programming problem. We looked at a number of packages on the CRAN Task View: Optimization and Mathematical Programming, however, we have not been able to locate

Re: [R] Equivalent to Matlab's Ans

2009-06-30 Thread Hans W. Borchers
There is a discussion on this topic under the heading A shorter version of .Last.value on July 7, 2008, see for example http://www.nabble.com/A-shorter-version-of-%22.Last.value%22--to18322831.html#a18322831 --Hans Werner Stephane-18 wrote: Hi everyone, I was just wondering if there is an

Re: [R] R- NLP on R but ....

2009-07-06 Thread Hans W Borchers
Rahul Varshney itsrahulvarshney at gmail.com writes: I'll appreciate the help on the following problem: I solved many Nonlinear programming problems with nonlinear constraintsRdonlp is working well but i am unable to get INTEGER data with nonlinear constraints in Rdonlp. Is it

[R] r-project.org address blacklisted by anti-spam software

2009-07-07 Thread Hans W Borchers
Dear List: An e-mail mentioning the r-project.org address and sent to a friend at a German university was considered spam by the local spam filter. Its reasoning: the URL r-project.org is blacklisted at uribl.swinog.ch resp. at antispam.imp.ch. I checked the list

[R] R interface to PSwarm

2009-07-23 Thread Hans W Borchers
Dear list: Being a bit unsatisfied with global optimization approaches in R such as SANN (in 'optim') or DEoptim, I looked for alternatives on the Web, such as PSwarm http://www.norg.uminho.pt/aivaz/pswarm/ or PIKAIA. There is an R interface to PSwarm (version 1.4) on its home page which I was

Re: [R] Automatic differentiation in R

2009-07-23 Thread Hans W. Borchers
Having given a lecture on Numerical Derivatives just a short time ago, I would like to mention the following: Many functions, especially in engineering, are not available as formulas built simply from arithmetical operators and elementary functions. They are provided as intricate procedures, as

Re: [R] computing the radius of an arc

2009-07-24 Thread Hans W Borchers
Nair, Murlidharan T mnair at iusb.edu writes: Hi!! I am interesting in computing the radius of an arc that best approximates a curve. Is there an R function that I can use to draw an arc? Nothing useful came up when I searched help.search. Does anyone have any suggestion to do this?

Re: [R] computing the radius of an arc

2009-07-28 Thread Hans W Borchers
Nair, Murlidharan T mnair at iusb.edu writes: Alex Brenning, the developer of the RSAGA package told me that and I quote the RSAGA package (which uses functions from the free geographical information system [GIS] SAGA GIS) has a curvature function that is designed to calculate the

Re: [R] re ading jpeg images?

2009-07-28 Thread Hans W. Borchers
I found the 'biOps' package for Image and data analysis quite helpful. (I did some astronomical investigations with it --- counting galaxies in a Hubble picture---and I do recommend this package.) Under Windows you have to unpack the 'libjpeg' and 'libtiff' libraries beforehand somewhere in

Re: [R] Long Range Dependence: Hurst exponent estimation

2008-08-04 Thread Hans W. Borchers
There is the 'fdim' package that computes the fractal dimension D. Between D and the Hurst exponent H there should be a relation D = 2 - H I wonder if this is true when computing D and H with different approaches Regards, Hans Werner Borchers ABB Corporate Research tolga.i.uzuner at

Re: [R] Are there any guis out there, which will allow editing of the graph?

2008-08-04 Thread Hans W. Borchers
Duncan Murdoch murdoch at stats.uwo.ca writes: On 04/08/2008 12:50 PM, Arthur Roberts wrote: Hi, all, I would like to know if there is any gui interface out there (academic or commercial) that allows one to edit R-language generated graphs (e.g positioning x axis labels.) It

Re: [R] Constrained Optimization

2008-08-04 Thread Hans W. Borchers
alan.ng at gmx.net writes: Hello, I am trying to run a constrained optimization in R. constrOptim is really useful and has helped me a lot, but unfortunately, it doesn't provide the hessian. Is there a solution to this problem? You didn't provide an example to understand why 'optim'

Re: [R] re cursive root finding

2008-08-08 Thread Hans W. Borchers
As your curve is defined by its points, I don't see any reason to artificially apply functions such as 'uniroot' or 'optim' (being a real overkill in this situation). First smooth the curve with splines, Savitsky-Golay, or Whittacker smoothing, etc., then loop through the sequence of points

Re: [R] FastICA

2008-08-12 Thread Hans W. Borchers
Maura E Monville maura.monville at gmail.com writes: Is the FastICA R implementation as good as the MatLab Implementation ? I would appreciate talking to someone who has used FastICA for R. The fastICA packages for Matlab and R (and there is even a version for Python) have a common origin at

Re: [R] FastICA

2008-08-12 Thread Hans W. Borchers
Prof Brian Ripley ripley at stats.ox.ac.uk writes: On Tue, 12 Aug 2008, someone with no signature wrote: Maura E Monville maura.monville at gmail.com writes: Is the FastICA R implementation as good as the MatLab Implementation ? I would appreciate talking to someone who has used

Re: [R] FastICA

2008-08-12 Thread Hans W. Borchers
I may not have been as wrong as Prof. Ripley suggested when I wrote The fastICA packages for Matlab and R (...) have a common origin at the Helsinki University of Technology. Please consider the following lines from the 'fastICA' help page (?fastICA): FastICA algorithm Description:

Re: [R] exporting adaBoost model

2008-08-18 Thread Hans W. Borchers
One way to port these kinds of models between applications is the Predictive Model Markup Language (PMML). The R package 'PMML' supports linear regression, rpart, SVM, and others, not adaBoost. On the other side, not even the Python machine learning library Orange does have an import function

Re: [R] Exponential smoothing?

2008-08-19 Thread Hans W. Borchers
Öhagen Patrik Patrik.Ohagen at mpa.se writes: Dear List, I have used all my resources (i.e. help.search) and I still havn't been able to figure out if there is an Exponential Smoothing command in R. A few weeks ago the book Forecasting with Exponential Smoothing by Hyndman et al. has

Re: [R] nonlinear constrained optimization

2008-08-19 Thread Hans W. Borchers
Paul Smith phhs80 at gmail.com writes: Up to my best knowledge, R cannot deal with optimization problems with nonlinear constraints, unless one uses the penalty method. Outside R, Ipopt and Algencan can solve problems like yours, but one needs to program in AMPL and/or C/Fortran. Paul

Re: [R] Convex optimization in R?

2008-09-11 Thread Hans W. Borchers
Hesen Peng hesen.peng at gmail.com writes: Hi my R buddies, I'm trying to solve a specific group of convex optimization in R. The admissible region is the inside and surface of a multi-dimensional eclipse area and the goal function is the sum of absolution values of the variables. Could

Re: [R] How to do knn regression?

2008-09-19 Thread Hans W. Borchers
Shengqiao Li shli at stat.wvu.edu writes: Hello, I want to do regression or missing value imputation by knn. I searched r-help mailing list. This question was asked in 2005. ksmooth and loess were recommended. But my case is different. I have many predictors (p20) and I really want try

Re: [R] How to find a shift between two curves or data sets

2008-09-19 Thread Hans W. Borchers
Dear Sébastien, identifying similarity in curves or time series is one of the main tasks in the quite recent field of 'Functional Data analysis' (FDA). See the 2005 book by Silverman from Springer Verlag or the corresponding Web page at url{http://www.psych.mcgill.ca/misc/fda/}. The 'fda'

Re: [R] How to do knn regression?

2008-09-28 Thread Hans W. Borchers
This is a summary of discussions between Shengqiao Li and me, entered here as a reference for future requests on knn regression or missing value imputation based on a nearest neighbor approach. There several functions that can be used for 'nearest neighbor' classification such as knn, knn1 (in

Re: [R] constrOptim with method = L-BFGS-B

2008-06-18 Thread Hans W. Borchers
Dear Georges, if you are interested in optimization methods in R, there is the Optimization Task View that has been set up only a few weeks ago. Most likely it covers all the optimization algorithms available in R packages. For constraint handling there have been some postings in April and May

[R] Histogram with colors according to factor

2008-07-08 Thread Hans W. Borchers
like 'lattice' and 'ggplot2'. Searching R-help revealed that 'histogram' is spelled 'histogramm' in almost 2% of the time. I now know how to color whole bars, but did not find a solution for this specific kind of visualization. Many thanks in advance, Hans Werner Borchers Hans W. Borchers ABB

  1   2   3   >