Giter Site home page Giter Site logo

raphael-boichot / finding-d-optimal-designs-without-the-pain Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.21 MB

A code to find D-optimal and orthogonal designs from an unspecified number of independant parameters

License: GNU General Public License v3.0

MATLAB 100.00%

finding-d-optimal-designs-without-the-pain's Introduction

Finding D-optimal designs without the pain

This Matlab code is intended to find D-optimal and orthogonal designs from an unspecified number of independant parameters in order to design experimental campaigns. It's very easy to use: enter the number of experiments planned and the number of independant parameters of your study. The code will try to find an optimal design for these conditions. We mean by "optimal" the fact that the variance/covariance matrix of the experiments has the maximal possible determinant while being orthogonal at the same time. It is fully optimal when the extra-diagonal terms of the variance/covariance matrix are null and the diagonal terms equals. Other configurations are only sub-optimal but still usable with not much risks.

The code generally converges readily for variance/covariance matrix of order 16 and less. Up to order 16, it converges to sub-optimal designs only (unless you let the code running for an unreasonnable amount of time). It can easily produce matrices with the same properties as Hadamard matrices, Plackett and Burman matrices or find factorial designs. It is limited to two-levels designs in its current version. It uses parallel computing because it is funnier but it can be run on a single core also.

The code itself comes from a loose implementation inspired from this document. It tries random substitution of +1/-1 from randomly generated matrices having the same number of +1 and -1 levels for each independant parameter. In other words, this is a constrained brute-force algorithm. I ended to this short and efficient code after many attempts with more complicated optimizations techniques that did not worked as well (for example genetic algorithms). Anyway, please cite the source in case you use this code.

15 parameters, 16 experiments, D-optimal, orthogonal (+1/-1 levels)

31 parameters, 32 experiments, nearly D-optimal, nearly orthogonal (+1/-1 levels)

5 parameters, 64 experiments, factorial design retrieved by the code (+1/-1 levels)

Side note

The way the code is implemented allows very easy modification for adding constraints, other type of optimality, extension to mixture designs, etc. Have fun with it. Maybe one day it will be extended to three or five levels design, maybe.

finding-d-optimal-designs-without-the-pain's People

Contributors

raphael-boichot avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.