|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ucla.stat.SOCR.analyses.command.volume.VolumeMultipleRegression
public class VolumeMultipleRegression
Constructor Summary | |
---|---|
VolumeMultipleRegression()
|
Method Summary | |
---|---|
static int |
byteArrayToInt(byte[] b,
int offset)
Convert the byte array to an int starting from the given offset. |
static double[] |
getNextInputDataBuffer(int data_type,
int xLength,
boolean flush)
This method READS IN a bufferSize chunk of all input volumes and returns it as a double[] |
static byte[] |
intToBytes(int v)
Convert an int to an array of 4 bytes. |
static boolean |
isRegressorValid(java.util.HashSet<java.lang.String> validRegressors,
Regressor newRegressor)
this method helps the parseRegressors method above in particular, it takes a list of validated regressor variables and a not-yet-validated regressor variable if the new variable is valid, this method returns true if not, then it returns false; the criteria for validity is described in the description of parseRegressors |
static byte[] |
longToBytes(long v)
Convert a long to an array of 8 bytes. |
static void |
main(java.lang.String[] args)
|
static boolean |
parseRegressors(java.util.StringTokenizer st)
check regressor list for interactions in particular, each interaction variable must be composed of individual regressor variables that are also included in the regressor list; for instance, if we have an interaction variable A*B*C, we must have (minimally): -regressors A,B,C,A*B,B*C,A*C,A*B*C |
static void |
putNextOutputDataBuffer(double[] constantIntercept_P_B_R_T,
double[] pValue,
double[] beta,
double[] rPartCor,
double[] tStat,
int independentLength,
boolean writeResultsOrDefaults,
boolean flush)
This method WRITES OUT bufferSize chunks of all output volumes |
static void |
setByteOrder(javax.imageio.stream.MemoryCacheImageInputStream dis,
java.lang.String byteorder)
This method sets the Bite-Order for a MemoryCacheImageInputStream |
static void |
setByteOrder(javax.imageio.stream.MemoryCacheImageOutputStream dos,
java.lang.String byteorder)
This method sets the Bite-Order for a MemoryCacheImageOutputStream |
static byte[] |
shortToBytes(short v)
Convert a short to an array of 2 bytes. |
static void |
skipNextInputDataBuffer(int data_type,
int xLength,
boolean flush)
This method SKIPS in reading data from the bufferSize chunk of all input volumes |
static char |
swapChar(byte[] b,
int offset)
Returns the char resulting from swapping 2 bytes at a specified offset in a byte array. |
static double |
swapDouble(byte[] b,
int offset)
Returns the double resulting from reversing 8 bytes at a specified offset in a byte array. |
static double |
swapDouble(double v)
Returns the double resulting from reversing 8 bytes of a specified double. |
static float |
swapFloat(byte[] b,
int offset)
Returns the float resulting from reversing 4 bytes at a specified offset in a byte array. |
static float |
swapFloat(float v)
Returns the float resulting from reversing 4 bytes of a specified float. |
static int |
swapInt(byte[] b,
int offset)
Returns the int resulting from reversing 4 bytes at a specified offset in a byte array. |
static int |
swapInt(int v)
Returns the int resulting from reversing 4 bytes of a specified int. |
static long |
swapLong(byte[] b,
int offset)
Returns the long resulting from reversing 8 bytes at a specified offset in a byte array. |
static long |
swapLong(long l)
Returns the long resulting from reversing 8 bytes of a specified long. |
static short |
swapShort(byte[] b,
int offset)
Returns the short resulting from swapping 2 bytes at a specified offset in a byte array. |
static short |
swapShort(short s)
Returns the short resulting from swapping 2 bytes of a specified short. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VolumeMultipleRegression()
Method Detail |
---|
public static void main(java.lang.String[] args)
public static boolean parseRegressors(java.util.StringTokenizer st)
public static boolean isRegressorValid(java.util.HashSet<java.lang.String> validRegressors, Regressor newRegressor)
public static void setByteOrder(javax.imageio.stream.MemoryCacheImageInputStream dis, java.lang.String byteorder)
dis
- - MemoryCacheImageInputStreambyteorder
- - String representation of byteorder. Options are
big (java.nio.ByteOrder.BIG_ENDIAN)
little (java.nio.ByteOrder.LITTLE_ENDIAN)
system (default system byteorder, java.nio.ByteOrder.nativeOrder())public static void setByteOrder(javax.imageio.stream.MemoryCacheImageOutputStream dos, java.lang.String byteorder)
dis
- - MemoryCacheImageOutputStreambyteorder
- - String representation of byteorder. Options are
big (java.nio.ByteOrder.BIG_ENDIAN)
little (java.nio.ByteOrder.LITTLE_ENDIAN)
system (default system byteorder, java.nio.ByteOrder.nativeOrder())public static double[] getNextInputDataBuffer(int data_type, int xLength, boolean flush)
data_type
- - type of the input dataxLength
- - number of volumes/subjects in the second-column (file-names) in the Design-matrixflush
- - boolean variable indicating whether the buffer should be flushed as the stream keeps
in memory all the data it has read from disk. This will free up memory, but too frequent
calls (frequent flushing will slow down the process!)public static void putNextOutputDataBuffer(double[] constantIntercept_P_B_R_T, double[] pValue, double[] beta, double[] rPartCor, double[] tStat, int independentLength, boolean writeResultsOrDefaults, boolean flush)
constantIntercept_P_B_R_T
- contains the pValue, Beta, R_PartCorr and TStat parameters of the intercept in the GLMpValue
- is a Probability value outputed by (MultiLinearRegressionResult) Result objectbeta
- is a beta/regression value outputted by (MultiLinearRegressionResult) Result objectrPartCor
- is a partial-correlation outputted by (MultiLinearRegressionResult) Result objecttStat
- is a T-statistics as outputed by (MultiLinearRegressionResult) Result objectindependentLength
- - integer value representing the number of Independent X VariableswriteResultsOrDefaults
- - true==results; false=Defaultflush
- - Boolean variable indicating whether the buffer should be flushed as teh ...keeps
in memory all the data it has read from disk. This will free up memory, but too frequent
calls (flush==true) will slow down the process!public static void skipNextInputDataBuffer(int data_type, int xLength, boolean flush)
data_type
- - type of the input dataxLength
- - number of volumes/subjects in the second-column (file-names) in the Design-matrixflush
- - boolean variable indicating whether the buffer should be flushed as the stream keeps
in memory all the data it has read from disk. This will free up memory, but too frequent
calls (frequent flushing will slow down the process!)public static short swapShort(byte[] b, int offset)
b
- the byte arrayoffset
- the offset of the first byte
b[offset+1], b[offset]
public static int swapInt(byte[] b, int offset)
b
- the byte arrayoffset
- the offset of the first byte
b[offset+3], b[offset+2], ..., b[offset]
public static long swapLong(byte[] b, int offset)
b
- the byte arrayoffset
- the offset of the first byte
b[offset+7], b[offset+6], ..., b[offset]
public static float swapFloat(byte[] b, int offset)
b
- the byte arrayoffset
- the offset of the first byte
b[offset+3], b[offset+2], ..., b[offset]
public static double swapDouble(byte[] b, int offset)
b
- the byte arrayoffset
- the offset of the first byte
b[offset+7], b[offset+6], ..., b[offset]
public static char swapChar(byte[] b, int offset)
b
- the byte arrayoffset
- the offset of the first byte
b[offset+1], b[offset]
public static short swapShort(short s)
s
- input value for which byte reversal is desired
s
reversedpublic static int swapInt(int v)
v
- input value for which byte reversal is desired
v
reversedpublic static long swapLong(long l)
l
- input value for which byte reversal is desired
l
reversedpublic static float swapFloat(float v)
v
- input value for which byte reversal is desired
v
reversedpublic static int byteArrayToInt(byte[] b, int offset)
b
- The byte arrayoffset
- The array offset
public static double swapDouble(double v)
v
- input value for which byte reversal is desired
v
reversedpublic static byte[] shortToBytes(short v)
v
- input value
public static byte[] intToBytes(int v)
v
- input value
public static byte[] longToBytes(long v)
v
- input value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |