Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: Testing 18.04
Views: 826
Kernel: Python 3 (system-wide)

Design of Experiments

doepy in python 3 (system-wide)

https://doepy.readthedocs.io/en/latest/#quick-start

from doepy import build
samples = build.space_filling_lhs( { 'Pressure': [40, 55, 70], 'Temperature': [290, 320, 350], 'Flow rate': [0.2, 0.4], 'Time': [5, 11] }, num_samples=20) samples
Pressure had more than two levels. Assigning the end point to the high level. Temperature had more than two levels. Assigning the end point to the high level.
Pressure Temperature Flow rate Time
0 47.894737 327.894737 0.242105 8.789474
1 44.736842 302.631579 0.336842 5.947368
2 70.000000 293.157895 0.294737 6.578947
3 41.578947 334.210526 0.315789 9.105263
4 58.947368 299.473684 0.389474 7.526316
5 46.315789 340.526316 0.368421 10.684211
6 66.842105 337.368421 0.357895 7.210526
7 63.684211 350.000000 0.347368 8.473684
8 52.631579 324.736842 0.210526 5.631579
9 51.052632 321.578947 0.273684 6.894737
10 40.000000 296.315789 0.400000 8.157895
11 43.157895 343.684211 0.200000 11.000000
12 68.421053 290.000000 0.305263 9.736842
13 49.473684 318.421053 0.231579 7.842105
14 54.210526 315.263158 0.221053 5.000000
15 57.368421 331.052632 0.378947 5.315789
16 65.263158 346.842105 0.252632 10.368421
17 55.789474 312.105263 0.326316 10.052632
18 60.526316 308.947368 0.263158 9.421053
19 62.105263 305.789474 0.284211 6.263158
from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt # plot fig = plt.figure(figsize=(12, 8)) ax = fig.add_subplot(111, projection='3d') ax.scatter3D(samples.Pressure, samples.Temperature, samples['Flow rate'], s=50) ax.set_xlabel('Pressure') ax.set_ylabel('Temperature') ax.set_zlabel('Flow rate'); ax.view_init(30, 125) plt.show()
Image in a Jupyter notebook