Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Can't minimize this simple function with constraints
Post: Can't minimize this simple function with constrain...

I want to minimize this objective funrtion: -10 000 000/100*(0*p0+100*p100) with constraints p0^56>=0.05 p0+p100=1 0<=p0<=1 0<=p100<=1 So that i used this code import numpy as np from s...
Alex009988 Data Science 0 2,004 Sep-25-2019, 10:33 AM
    Thread: Nelder-Mead gives wrong result
Post: Nelder-Mead gives wrong result

Hello. I want to solve some optimization problem with Nelder-Mead algorithm. After that I want to port it into VBA. So I use this code class Vector(object): def __init__(self, x, y): """ ...
Alex009988 Data Science 0 1,471 Sep-02-2019, 07:39 PM
    Thread: Python sorts all arrays instead of one.
Post: Python sorts all arrays instead of one.

Hello. I want only to sort c1. Using that code it sorts both c and c1 def f(v): x=v[0] y=v[1] return x**2 + x*y + y**2 - 6*x - 9*y v1 = [0, 0] v2 = [1, 0] v3 = [0, 1] v=[v1,v2,v3] c=[f(v1)...
Alex009988 General Coding Help 2 2,042 Sep-02-2019, 01:59 PM
    Thread: Can't find a way to solve this nonlinear equation
Post: RE: Can't find a way to solve this nonlinear equat...

Well seems fsolve is not a good option for this equation as I need to set a p0 guess with a certain precision. More over I have the same problem as with vba in excel when m, that is factorial, more th...
Alex009988 Data Science 2 2,659 Aug-15-2019, 12:42 PM
    Thread: Can't find a way to solve this nonlinear equation
Post: Can't find a way to solve this nonlinear equation

I want to solve this nonlinear equation. I've tried to use sympy and scipy methods. But I thing something wrong with syntax. So how to write this code correctly? import sympy import numpy as np import...
Alex009988 Data Science 2 2,659 Aug-15-2019, 10:08 AM
    Thread: Cant's get accurate unbiased variance.
Post: Cant's get accurate unbiased variance.

Hello. So that I use that code import numpy as np import math t=[0.10,0.15,0.16] Y=10000000; n=56 t1=[0]*n m=len(t) t1[0:m-1]=t s=math.sqrt(Y*(Y-n)/n*np.var(t1,ddof=1)) print(s)and get that output as ...
Alex009988 Data Science 1 2,300 Aug-13-2019, 02:41 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020