On 02/20/2014 01:56 AM, "André Walker-Loud " wrote:
On Feb 19, 2014, at 7:45 PM, André Walker-Loud wrote:
OK - I have not seen an email from Peter.
So I looked up the thread online, and see I did not receive half the emails on
this thread :O
My first inclination was to blame my mac mavericks
On 20 February 2014 00:56, "André Walker-Loud "
wrote:
> On Feb 19, 2014, at 7:45 PM, André Walker-Loud wrote:
>
>> OK - I have not seen an email from Peter.
>> So I looked up the thread online, and see I did not receive half the emails
>> on this thread :O
>>
>> My first inclination was to blam
On 20/02/2014 00:56, "André Walker-Loud " wrote:
On Feb 19, 2014, at 7:45 PM, André Walker-Loud wrote:
OK - I have not seen an email from Peter.
So I looked up the thread online, and see I did not receive half the emails on
this thread :O
My first inclination was to blame my mac mavericks ma
On Feb 19, 2014, at 7:45 PM, André Walker-Loud wrote:
> OK - I have not seen an email from Peter.
> So I looked up the thread online, and see I did not receive half the emails
> on this thread :O
>
> My first inclination was to blame my mac mavericks mail gmail syncing
> problem. but logging
OK - I have not seen an email from Peter.
So I looked up the thread online, and see I did not receive half the emails on
this thread :O
My first inclination was to blame my mac mavericks mail gmail syncing problem.
but logging into gmail, I see no record of the emails there either.
I currently
On Wed, Feb 19, 2014 at 6:59 PM, "André Walker-Loud
" wrote:
>
> Also, since you are chiming in, do you have an opinion in general about
> which approach you prefer? The string hacking vs class method (for lack
> of better way to describe them)?
I've never used iminuit before. I'd ask on a suppo
Hi eryksun,
Thanks - this is great.
Also, since you are chiming in, do you have an opinion in general about which
approach you prefer? The string hacking vs class method (for lack of better
way to describe them)?
Cheers,
Andre
On Feb 19, 2014, at 4:56 PM, eryksun wrote:
> On Wed, Feb 19
On Wed, Feb 19, 2014 at 2:56 PM, "André Walker-Loud
" wrote:
>
> I also happened to get the string-hack to work (which requires
> using global variables).
Functions load unassigned names from the global/builtins scopes, so
there's no need to declare the g* variables global in chisq_mn. Also,
impl
Hi eryksun,
Indeed, I am using iminuit to interface with Minuit.
That is where I am learning to make my own classes to set up my functions to
pass into the minimizer. I also happened to get the string-hack to work (which
requires using global variables). Instead of just copying (since it works)
Hi Oscar,
>> Is there a benefit to this method vs a standard linear least squares?
>
> It's the same except that you're using an analytic solution rather
> than a black box solver.
OK. Interesting. I usually construct the analytic solution by just
differentiating the chi^2, which sets up, I a
On Wed, Feb 19, 2014 at 7:33 AM, Oscar Benjamin
wrote:
> I don't really understand why it works that way though.
> Looking here
>
>http://iminuit.github.io/iminuit/api.html#function-sig-label
This API is unusual, but co_argcount and co_varnames should be
available and defined as per the spec:
On 02/19/2014 07:33 AM, Oscar Benjamin wrote:
At the least I don't understand why it needs both the argument names
and the number of arguments as independent quantities. Surely
len(names) would be the number of arguments... Or am I missing
something?
In the standard library, the attributes a
On 18 February 2014 17:59, Peter Otten <__pete...@web.de> wrote:
>
> I don't know if the OP may use it, but there seems to be a version of minuit
> that allows to override the function signature:
>
> """
> forced_parameters: tell Minuit not to do function signature detection and
> use this argument
Oscar Benjamin wrote:
> On 17 February 2014 20:13, Peter Otten <__pete...@web.de> wrote:
>> André Walker-Loud wrote:
>>>
>>> The 3rd party minimizer utilizes the .func_code.co_varnames and
>>> .func_code.co_argcount to determine the name and number of variables to
>>> minimize. eg.
>>>
>>> =
On 18 February 2014 00:51, "André Walker-Loud "
wrote:
>>
>> BTW if you're trying to fit the coefficients of a polynomial then a
>> general purpose optimisation function is probably not what you want to
>> use. I would probably solve (in a least squares sense and after
>> suitable scaling) the Van
On 02/17/2014 08:23 PM, "André Walker-Loud " wrote:
Hello python tutors,
I am utilizing a 3rd party numerical minimization routine. This routine
requires an input function, which takes as arguments, only the variables with
which to solve for. But I don’t want to define all possible input fun
On 02/18/2014 12:02 AM, Oscar Benjamin wrote:
On 17 February 2014 22:15, "André Walker-Loud "
wrote:
This particular case is easily solved:
def f_lambda(x,pars):
return lambda x: poly(x,*pars)
You let the closure take care of pars and return a function that takes
exactly one argument x.
Hi Oscar,
On Feb 17, 2014, at 7:03 PM, Oscar Benjamin wrote:
> On 17 February 2014 22:15, "André Walker-Loud "
> wrote:
>>> This particular case is easily solved:
>>>
>>> def f_lambda(x,pars):
>>>return lambda x: poly(x,*pars)
>>>
>>> You let the closure take care of pars and return a fu
Hi Oscar,
On Feb 17, 2014, at 6:02 PM, Oscar Benjamin wrote:
> On 17 February 2014 22:15, "André Walker-Loud "
> wrote:
>>> This particular case is easily solved:
>>>
>>> def f_lambda(x,pars):
>>>return lambda x: poly(x,*pars)
>>>
>>> You let the closure take care of pars and return a fun
On 17 February 2014 22:15, "André Walker-Loud "
wrote:
>> This particular case is easily solved:
>>
>> def f_lambda(x,pars):
>> return lambda x: poly(x,*pars)
>>
>> You let the closure take care of pars and return a function that takes
>> exactly one argument x.
>
> Hi Oscar,
>
> This is the o
On 17 February 2014 22:15, "André Walker-Loud "
wrote:
>> This particular case is easily solved:
>>
>> def f_lambda(x,pars):
>> return lambda x: poly(x,*pars)
>>
>> You let the closure take care of pars and return a function that takes
>> exactly one argument x.
>
> Hi Oscar,
>
> This is the o
> This particular case is easily solved:
>
> def f_lambda(x,pars):
> return lambda x: poly(x,*pars)
>
> You let the closure take care of pars and return a function that takes
> exactly one argument x.
Hi Oscar,
This is the opposite of what I am trying to do. In the example, x represents
t
On 17 February 2014 21:18, "André Walker-Loud "
wrote:
>
> What I am trying to avoid is having to write a special case for each order of
> polynomial I want. I tried the following
>
> def poly(x,pars):
> val = 0.
> for i,ci in enumerate(pars):
> val += x**i * ci
> return val
Peter Otten <__pete...@web.de> Wrote in message:
> André Walker-Loud wrote:
>
>> Hello python tutors,
>>
>> I am utilizing a 3rd party numerical minimization routine. This routine
>> requires an input function, which takes as arguments, only the variables
>> with which to solve for. But I do
On Mon, Feb 17, 2014 at 07:58:00PM +, Oscar Benjamin wrote:
> The "right" solution is to change the interface of the third party
> function. It is poorly designed and should not be inspecting those function
> attributes or it should at least provide an option for you to provide that
> informat
Hi Oscar,
Let me clear up my description of one point - I don’t want to pick on the third
party software guys.
> The "right" solution is to change the interface of the third party function.
> It is poorly designed and should not be inspecting those function attributes
> or it should at least p
On 17 February 2014 20:13, Peter Otten <__pete...@web.de> wrote:
> André Walker-Loud wrote:
>>
>> The 3rd party minimizer utilizes the .func_code.co_varnames and
>> .func_code.co_argcount to determine the name and number of variables to
>> minimize. eg.
>>
>> =
>> METHOD 2: use strings, e
André Walker-Loud wrote:
> Hello python tutors,
>
> I am utilizing a 3rd party numerical minimization routine. This routine
> requires an input function, which takes as arguments, only the variables
> with which to solve for. But I don’t want to define all possible input
> functions, in a gian
On Feb 17, 2014 7:24 PM, ""André Walker-Loud
""
wrote:
>
> Question 1:
> Is there a better way to accomplish (my hopefully clear) goals?
I'm not sure that there is given the constraints you're under from the
third party function.
> Question 2:
> In method 1, is there a way t
Hello python tutors,
I am utilizing a 3rd party numerical minimization routine. This routine
requires an input function, which takes as arguments, only the variables with
which to solve for. But I don’t want to define all possible input functions,
in a giant switch, but rather, if I know I am
30 matches
Mail list logo