Package coconad
Class PSFnPSR
java.lang.Object
coconad.PSFnPSR
- All Implemented Interfaces:
util.Executable
Class for Pattern Spectrum Filtering and Pattern Set Reduction.
Provides an executable object that can be run as a thread.
- Since:
- 2013.12.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
target pattern subtype: all frequent item setsstatic final int
algorithm variant: basic version (low memory consumption, slow)static final int
surrogate method: dithered blocked permutationsstatic final int
target pattern subtype: all closed (frequent) item setsstatic final int
algorithm variant: refined version (closed/maximal repository)static final int
surrogate method: event/spike dithering/displacementstatic final int
surrogate method: estimate pattern spectrum (no surrogates)static final int
algorithm variant: refined version (spike and train filtering)static final int
target pattern subtype: all frequent item setsstatic final int
random number method: Gaussian density (identical toNORMAL
static final int
surrogate method: identity (keep original data)static final int
target pattern type: all frequent item setsstatic final int
surrogate method: sampling from kernel estimatestatic final int
target pattern subtype: all maximal (frequent) item setsstatic final int
surrogate method: none (no pattern spectrum filtering)static final int
random number method: normal density (identical toGAUSS
static final int
target pattern type: all frequent item setsstatic final int
surrogate method: dithered event/spike permutationstatic final int
surrogate method: event/spike time rendomizationstatic final int
surrogate method: read pattern spectrum from filestatic final int
random number method: rectangular density (identical toUNIFORM
static final int
target pattern type: all closed (frequent) item setsstatic final int
surrogate method: train shifting/ditheringstatic final int
random number method: triangular densitystatic final int
random number method: uniform density (identical toRECT
-
Constructor Summary
ConstructorsConstructorDescriptionPSFnPSR()
Create an object for pattern spectrum filtering and pattern set reduction.PSFnPSR
(ActionListener progrep) Create an object for pattern spectrum filtering and pattern set reduction. -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
Abort the computations (set an abort flag).void
exec()
Execute pattern spectrum filtering and pattern set reduction.Get the result message of the computations.void
setCoCoNAD
(int target, int suborig, int subsurr, double width, int supp, int zmin, int zmax) Set the CoCoNAD parameters.void
setCoCoNAD
(int target, int suborig, int subsurr, double width, int supp, int zmin, int zmax, int algo, int mode) Set the CoCoNAD parameters.void
setCPUs
(int cpus) Set the number of CPUs/threads to use.void
setEstimate
(int equiv, double alpha, int smpls) Set the pattern spectrum estimation parameters.void
setEstimate
(int equiv, double alpha, int smpls, int seed) Set the pattern spectrum estimation parameters.void
Set the pattern output file name.void
Set the pattern output file name and the format strings.void
setRange
(double beg, double end) Set the (allowed) range of points/spike times.void
setReduction
(int psr) Set the pattern set reduction method.void
setSpectrum
(String fn_psp) Set the name of the pattern spectrum file.void
setSpectrum
(String fn_psp, String pspsep) Set the name of the pattern spectrum file.void
setSpectrum
(table.Table spectrum) Set the pattern spectrum.void
setSurrogate
(int cnt, int surr, int rand, double sigma, double delta) Set the surrogate data parameters.void
setSurrogate
(int cnt, int surr, int rand, double sigma, double delta, int seed) Set the surrogate data parameters.void
Set the train set to analyze.void
Set the name of the train set file.void
Set the name of the train set file and the record contents mode.void
Set the name of the train set file, the structure characters, and the record contents mode.
-
Field Details
-
ITEMSET
public static final int ITEMSETtarget pattern type: all frequent item sets- See Also:
-
PERMUTATION
public static final int PERMUTATIONtarget pattern type: all frequent item sets- See Also:
-
SEQUENCE
public static final int SEQUENCEtarget pattern type: all closed (frequent) item sets- See Also:
-
FREQUENT
public static final int FREQUENTtarget pattern subtype: all frequent item sets- See Also:
-
ALL
public static final int ALLtarget pattern subtype: all frequent item sets- See Also:
-
CLOSED
public static final int CLOSEDtarget pattern subtype: all closed (frequent) item sets- See Also:
-
MAXIMAL
public static final int MAXIMALtarget pattern subtype: all maximal (frequent) item sets- See Also:
-
BASIC
public static final int BASICalgorithm variant: basic version (low memory consumption, slow)- See Also:
-
FILTER
public static final int FILTERalgorithm variant: refined version (spike and train filtering)- See Also:
-
CMREPO
public static final int CMREPOalgorithm variant: refined version (closed/maximal repository)- See Also:
-
NONE
public static final int NONEsurrogate method: none (no pattern spectrum filtering)- See Also:
-
READ
public static final int READsurrogate method: read pattern spectrum from file- See Also:
-
ESTIMATE
public static final int ESTIMATEsurrogate method: estimate pattern spectrum (no surrogates)- See Also:
-
IDENTITY
public static final int IDENTITYsurrogate method: identity (keep original data)- See Also:
-
RANDOM
public static final int RANDOMsurrogate method: event/spike time rendomization- See Also:
-
DITHER
public static final int DITHERsurrogate method: event/spike dithering/displacement- See Also:
-
SHIFT
public static final int SHIFTsurrogate method: train shifting/dithering- See Also:
-
KERNEST
public static final int KERNESTsurrogate method: sampling from kernel estimate- See Also:
-
PERMUTE
public static final int PERMUTEsurrogate method: dithered event/spike permutation- See Also:
-
BLOCK
public static final int BLOCKsurrogate method: dithered blocked permutations- See Also:
-
UNIFORM
public static final int UNIFORMrandom number method: uniform density (identical toRECT
- See Also:
-
RECT
public static final int RECTrandom number method: rectangular density (identical toUNIFORM
- See Also:
-
TRIANG
public static final int TRIANGrandom number method: triangular density- See Also:
-
GAUSS
public static final int GAUSSrandom number method: Gaussian density (identical toNORMAL
- See Also:
-
NORMAL
public static final int NORMALrandom number method: normal density (identical toGAUSS
- See Also:
-
-
Constructor Details
-
PSFnPSR
public PSFnPSR()Create an object for pattern spectrum filtering and pattern set reduction.- Since:
- 2013.12.10 (Christian Borgelt)
-
PSFnPSR
Create an object for pattern spectrum filtering and pattern set reduction.- Parameters:
progrep
- the progress reporter- Since:
- 2013.12.10 (Christian Borgelt)
-
-
Method Details
-
setTrains
Set the name of the train set file.- Parameters:
fn_tns
- the name of the train set file- Since:
- 2013.12.10 (Christian Borgelt)
-
setTrains
Set the name of the train set file and the record contents mode.- Parameters:
fn_tns
- the name of the train set filemode
- the record contents mode (TrainSet.ITEM_POINT
,TrainSet.POINT_ITEM
,TrainSet.ITEM_TRAIN
orTrainSet.PURE_TRAIN
)- Since:
- 2013.12.10 (Christian Borgelt)
-
setTrains
public void setTrains(String fn_tns, String recseps, String fldseps, String blanks, String comment, int mode) Set the name of the train set file, the structure characters, and the record contents mode.- Parameters:
fn_tns
- the name of the train set filerecseps
- the record separatorsfldseps
- the field separatorsblanks
- the blank characterscomment
- the comment charactersmode
- the record contents mode (TrainSet.ITEM_POINT
,TrainSet.POINT_ITEM
,TrainSet.ITEM_TRAIN
orTrainSet.PURE_TRAIN
)- Since:
- 2013.12.10 (Christian Borgelt)
-
setTrains
Set the train set to analyze.- Parameters:
trains
- the train set to analyze- Since:
- 2013.12.10 (Christian Borgelt)
-
setSpectrum
Set the name of the pattern spectrum file.- Parameters:
fn_psp
- the name of the pattern spectrum file- Since:
- 2013.12.10 (Christian Borgelt)
-
setSpectrum
Set the name of the pattern spectrum file.- Parameters:
fn_psp
- the name of the pattern spectrum filepspsep
- the field separators for the pattern spectrum- Since:
- 2013.12.10 (Christian Borgelt)
-
setSpectrum
public void setSpectrum(table.Table spectrum) Set the pattern spectrum.- Parameters:
spectrum
- the pattern spectrum as a 3 column table- Since:
- 2013.12.10 (Christian Borgelt)
-
setOutput
Set the pattern output file name.- Parameters:
fn_out
- the pattern output file name- Since:
- 2013.12.10 (Christian Borgelt)
-
setOutput
Set the pattern output file name and the format strings.- Parameters:
fn_out
- the pattern output file nameheader
- the record header (output before each pattern)itemsep
- the item separator (output between patterns)outfmt
- the support output format- Since:
- 2013.12.10 (Christian Borgelt)
-
setRange
public void setRange(double beg, double end) Set the (allowed) range of points/spike times.- Parameters:
beg
- the beginning of the point rangeend
- the end of the point range- Since:
- 2013.12.10 (Christian Borgelt)
-
setSurrogate
public void setSurrogate(int cnt, int surr, int rand, double sigma, double delta) Set the surrogate data parameters.- Parameters:
cnt
- the number of surrogate data sets to generatesurr
- the surrgate data generation method (e.g.DITHER
orPERMUTE
)rand
- the random number density function type (e.g.UNIFORM
orNORMAL
)sigma
- the random number density function parameterdelta
- the block size for blocked permutations- Since:
- 2013.12.10 (Christian Borgelt)
-
setSurrogate
public void setSurrogate(int cnt, int surr, int rand, double sigma, double delta, int seed) Set the surrogate data parameters.- Parameters:
cnt
- the number of surrogate data sets to generatesurr
- the surrgate data generation methodrand
- the random number density function typesigma
- the random number density function parameterdelta
- the block size for blocked permutationsseed
- the seed for the random number generator- Since:
- 2013.12.10 (Christian Borgelt)
-
setEstimate
public void setEstimate(int equiv, double alpha, int smpls) Set the pattern spectrum estimation parameters.- Parameters:
equiv
- the equivalent number of surrogate data setsalpha
- the item probability dispersion factorsmpls
- the number of samples per item set size- Since:
- 2014.03.07 (Christian Borgelt)
-
setEstimate
public void setEstimate(int equiv, double alpha, int smpls, int seed) Set the pattern spectrum estimation parameters.- Parameters:
equiv
- the equivalent number of surrogate data setsalpha
- the item probability dispersion factorsmpls
- the number of samples per item set sizeseed
- the seed for the random number generator- Since:
- 2014.03.07 (Christian Borgelt)
-
setCoCoNAD
public void setCoCoNAD(int target, int suborig, int subsurr, double width, int supp, int zmin, int zmax) Set the CoCoNAD parameters.- Parameters:
target
- the target pattern type (ITEMSET
,PERMUTATION
, orSEQUENCE
)suborig
- the target pattern subtype for the original data (FREQUENT
,SETS
,CLOSED
orMAXIMAL
)subsurr
- the target pattern subtype for the surrogate data (FREQUENT
,SETS
,CLOSED
orMAXIMAL
)width
- the window width/maximum distancesupp
- the minimum support of an item setzmin
- the minimal size of an item setzmax
- the maximal size of an item set- Since:
- 2013.12.10 (Christian Borgelt)
-
setCoCoNAD
public void setCoCoNAD(int target, int suborig, int subsurr, double width, int supp, int zmin, int zmax, int algo, int mode) Set the CoCoNAD parameters.- Parameters:
target
- the target pattern type (ITEMSET
,PERMUTATION
, orSEQUENCE
)suborig
- the target pattern subtype for the original data (FREQUENT
,SETS
,CLOSED
orMAXIMAL
)subsurr
- the target pattern subtype for the surrogate data (FREQUENT
,SETS
,CLOSED
orMAXIMAL
)width
- the window width/maximum distancesupp
- the minimum support of an item setzmin
- the minimal size of an item setzmax
- the maximal size of an item setalgo
- the CoCoNAD algorithm variant to use (BASIC
,FILTER
orCMREPO
)mode
- the processign mode to use (NONE
or flagsNOPERFECT
orNOSORT
)- Since:
- 2013.12.10 (Christian Borgelt)
-
setReduction
public void setReduction(int psr) Set the pattern set reduction method.- Parameters:
psr
- the pattern set reduction method- Since:
- 2013.12.10 (Christian Borgelt)
-
setCPUs
public void setCPUs(int cpus) Set the number of CPUs/threads to use.- Parameters:
cpus
- the number of CPUs/threads to use (0: determine a suitable number automatically)- Since:
- 2013.12.10 (Christian Borgelt)
-
exec
Execute pattern spectrum filtering and pattern set reduction.- Specified by:
exec
in interfaceutil.Executable
- Throws:
IOException
- Since:
- 2013.12.10 (Christian Borgelt)
-
abort
public void abort()Abort the computations (set an abort flag).- Specified by:
abort
in interfaceutil.Executable
- Since:
- 2013.12.10 (Christian Borgelt)
-
getResultMsg
Get the result message of the computations.- Returns:
- the result message of the computations
- Since:
- 2013.12.10 (Christian Borgelt)
-