# 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

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

ans=True
while ans:
print("""
1.Facto full
""")
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):
return Matrix, lignes
Y = []
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
if ans == 1:
a, lignes = create_matrix()
print a
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 &lt; 4:
i=4
elif x &gt;= 4 and x &lt; 8:
i=8
else:
print ("Too much parameters for this program")
x = i-x
while x &gt; 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):

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()