Experimentaldesign .pdf


Nom original: Experimentaldesign.pdfAuteur: Victor Collange

Ce document au format PDF 1.5 a été généré par Microsoft® Word 2016, et a été envoyé sur fichier-pdf.fr le 11/01/2017 à 14:19, depuis l'adresse IP 130.237.x.x. La présente page de téléchargement du fichier a été vue 361 fois.
Taille du document: 174 Ko (3 pages).
Confidentialité: fichier public


Aperçu du document


from scipy.linalg import hadamard
import numpy as np
from numpy.linalg import inv
import matplotlib.pyplot as plt
import sys
from operator import mul

def menu():
ans=True
while ans:
print("""
1.Facto full
2.My matrix (Hadamard)
3.Pre enter matrix (Hadamard)
""")
ans=input("What would you like to do? ")
return ans
if ans==1:
print("\nPre enter matrix")
break
elif ans==2:
print("\nMy matrix")
break
elif ans==3:
print("\nFacto full")
break
else:
print("\n Not Valid Choice")
def create_matrix():
lignes = input("How many lines in your matrix ? ")
matrix = []
for i in range(0,lignes):
Value = raw_input("Enter row no "+str(i)+" values : ")
Value = map(int, Value.split())
matrix.append([Value])
Size = len(matrix)
Matrix = matrix [0]
for i in range (1,Size):
Add = matrix[i]
Matrix = np.vstack((Matrix,Add))
return Matrix, lignes
def answer(i):
Y = []
print ("Enter your answer corresponding to the right
expirementation.")
for i in range(0,i):
v = raw_input("Result "+str(i)+" : ")
Y.append([v])
Y = np.array(Y,dtype=float)

return Y
def interactions(a,lignes,colonnes):
Moyenne = np.mean(a[:,colonnes-1])
print ("b0 = %s" % Moyenne)
Intera = True
while Intera:
b = np.ones(lignes)
Intera = raw_input("Which parameters you want study ?
Separate numbers by an espace : ")
if Intera == "":
break
Inter = map(int, Intera.split())
Inter = reduce(mul,[a[:,x-1] for x in Inter])
b = np.mean(Inter*a[:,colonnes-1])
print b
ans=menu()
if ans == 1:
a, lignes = create_matrix()
print a
Y = answer(lignes)
a = np.column_stack((a,Y))
lignes, colonnes = a.shape
interactions(a,lignes,colonnes)
sys.exit(1)
elif ans==2:
a, i = create_matrix()
else:
x = input ("Numbers of parameters (maximum 7)? : ")
if x < 4:
i=4
elif x >= 4 and x < 8:
i=8
else:
print ("Too much parameters for this program")
a = hadamard(i)
x = i-x
while x > 0:
a = np.delete(a,0,1)
x = x-1
print ("Here it is the matrix we will use, please make your experiences
following this order.")
print a
x = input ("How many variables do you study ? : ")
for k in range(0,x):

Y = answer(i)
B = np.dot (np.linalg.inv(np.dot(a.T,a)),np.dot(a.T,Y))
k = k+1
raw_input("Name of the study variable : ")
print ("Weight of each parameters : ")
moy = np.mean(Y)
print B,moy
#plt.plot(B,"rs")
#plt.axhline(y=0)
#plt.xlabel("Parameters")
#plt.ylabel("weight")
#plt.show()


Aperçu du document Experimentaldesign.pdf - page 1/3

Aperçu du document Experimentaldesign.pdf - page 2/3

Aperçu du document Experimentaldesign.pdf - page 3/3




Télécharger le fichier (PDF)


Experimentaldesign.pdf (PDF, 174 Ko)

Télécharger
Formats alternatifs: ZIP



Documents similaires


experimentaldesign
dyn4300 manual
t65 24 eaet
c264 nrjed111046en
nrjed111218en p849 v juillet
physreva 84 020303

Sur le même sujet..