ok thank you :)
Here is what i did
data = np.loadtxt('xy.csv',skiprows=1, delimiter=';')
x =data[:,1]
w = data[:,2]
#int.x
a = (x/2 + 0.5)* 0.1
b= 0.1+(x/2+.5)*0.9
g = 1+(x/2+.5)*9
c= 10+(x/2+.5)*90
d= 100+(x/2+.5)*900
X=[]
X.append(a)
X.append(b)
X.append(g)
X.append(c)
X.append(d)
#X=np.concatenate((a,b,g,c,d))
#int.w
q= w* 0.1/2
e= w*0.9/2
r= w*9/2
m= w*90/2
n= w*900/2
W=np.concatenate((q,e,r,m,n))
plt.plot(W)
ax.plot(a, norm.pdf(a), 'r-', lw=5, alpha=0.6, label='norm pdf')
This W is my weight. And now i tried to write a code for pdf ..like this
def mepdf(MF,l):
def pdf(X):
for i in range(0,l.size):
Y[:,i]= MF[i](X)
Here i have the problem that this code is from R and there is : MF[[i]](x)...i don't know how i can do it in Python
I am really sure that my way is wrong
np.exp(l * Y.T)
break
return X
return mepdf(MF,l)
And i want that my weights from the csv file are approximate to the norm-pdf
But my error if i try it like here mepdf(..) :
Quote:RecursionError: maximum recursion depth exceeded