|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.bme.smile.commons.optimize.tensor.MLTensor
public class MLTensor
This class is used to minimize the least likelihood estimator from data from diffusion weighted imaging. It appears that all the algorithms but Line Search using Newton's method are very stable. The Line Searches are fairly slow since they have to iterate through the optimizer so many times. Both Downhill Simplex and LM are very fast, with Downhill Simplex only slightly faster with this function. With nicer functions LM can be significantly faster than Downhill Simplex as demonstrated by the optimization of simpler functions in TestNDOptimizations.
Field Summary | |
---|---|
static double |
PLUS_EPSILON
|
Constructor Summary | |
---|---|
MLTensor()
|
Method Summary | |
---|---|
double |
getB0()
Gets the value of b0 |
Matrix |
getD()
Gets the D matrix |
int |
getIterations()
Gets the number of iterations required to calculate the result. |
double |
getSigma()
Gets the value of sigma. |
void |
init(Matrix imgMatrix,
double b0,
double sigma,
double obsB0,
double[] obsDW,
double[] dInit)
Initializes MLTensor with these parameters |
double |
LLvalue()
Calculates the least likelihood value |
boolean |
optimize6D2D(int method,
int maxIter)
Lets you specify which algorithm to use and the maximum number of iterations. |
boolean |
optimize8D(int method)
Lets you specify which algorithm to use to optimize all 8 parameters at once. |
void |
setDFactor(double d)
Sets the scaling factor for D. |
void |
setDomain(double[] min,
double[] max)
Sets the domain minimum and maximum values. |
void |
setMethod(int m)
Sets the method used to calculate the derivatives. |
void |
setSigmaFactor(double s)
Sets the scaling factor for sigma. |
void |
setStepSize(double s)
Sets the step size used in calculating derivatives. |
void |
setTolerance(double t)
Sets the tolerance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double PLUS_EPSILON
Constructor Detail |
---|
public MLTensor()
Method Detail |
---|
public void init(Matrix imgMatrix, double b0, double sigma, double obsB0, double[] obsDW, double[] dInit)
imgMatrix
- image matrixb0
- b0sigma
- standard deviationobsB0
- observed b0obsDW
- observed diffusion weighted datadInit
- initial tensorpublic boolean optimize8D(int method)
method
- 0 - Downhill Simplex; 1 - LM; 2 - Line Search using Golden Section Search
3 - Line Search using Brent's Method; 4 - Line Search using Newton
public boolean optimize6D2D(int method, int maxIter)
method
- 0 - Downhill Simplex; 1 - LM; 2 - Line Search using Golden Section Search
3 - Line Search using Brent's; 4 - Line Search using NewtonmaxIter
- maximum number of iterations
public double LLvalue()
public double getB0()
public double getSigma()
public Matrix getD()
public void setSigmaFactor(double s)
s
- number to scale sigma bypublic void setDFactor(double d)
d
- number to scale D bypublic void setTolerance(double t)
t
- tolerancepublic void setStepSize(double s)
s
- step sizepublic void setMethod(int m)
m
- methodpublic void setDomain(double[] min, double[] max)
min
- domain minimum array of size 8max
- domain maximum array of size 8public int getIterations()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |