Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
lafabregue
MultiCube
Commits
18be25b4
Commit
18be25b4
authored
Apr 05, 2017
by
lafabregue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update constraint format to Orlean format and add distance matrix computation
parent
644b31db
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1759 additions
and
25 deletions
+1759
-25
hs_err_pid21551.log
hs_err_pid21551.log
+1477
-0
src/mustic/gui/ImageSession.java
src/mustic/gui/ImageSession.java
+1
-1
src/mustic/gui/MainFrame.java
src/mustic/gui/MainFrame.java
+24
-0
src/mustic/gui/dialog/DataToArffDialog.java
src/mustic/gui/dialog/DataToArffDialog.java
+10
-14
src/mustic/gui/dialog/DistanceMatrixDialog.java
src/mustic/gui/dialog/DistanceMatrixDialog.java
+166
-0
src/mustic/gui/dialog/classifier/ConstraintsSelectionDialog.java
...tic/gui/dialog/classifier/ConstraintsSelectionDialog.java
+7
-7
src/mustic/gui/dialog/messages_en.properties
src/mustic/gui/dialog/messages_en.properties
+15
-0
src/mustic/gui/messages_en.properties
src/mustic/gui/messages_en.properties
+1
-0
src/mustic/gui/messages_fr.properties
src/mustic/gui/messages_fr.properties
+1
-0
src/mustic/utils/io/CSVUtils.java
src/mustic/utils/io/CSVUtils.java
+1
-1
src/mustic/utils/io/WriteDistancesPath.java
src/mustic/utils/io/WriteDistancesPath.java
+52
-0
src/mustic/utils/io/dataExchange/DataArffExchange.java
src/mustic/utils/io/dataExchange/DataArffExchange.java
+4
-2
No files found.
hs_err_pid21551.log
0 → 100644
View file @
18be25b4
This diff is collapsed.
Click to expand it.
src/mustic/gui/ImageSession.java
View file @
18be25b4
...
...
@@ -66,7 +66,7 @@ public class ImageSession {
public
SSHParameters
sshparameters
=
null
;
/** enable the image to display the image or not, for a memory usage matter */
private
boolean
displayEnable
=
tru
e
;
private
boolean
displayEnable
=
fals
e
;
/**
* @param aImage
...
...
src/mustic/gui/MainFrame.java
View file @
18be25b4
...
...
@@ -569,6 +569,16 @@ public class MainFrame extends JFrame {
}
});
toolsMenu
.
add
(
menuTransformationBmp
);
/** Menu to generate constraints from current image session */
menuDistanceMatrix
=
new
JMenuItem
(
Messages
.
getString
(
"MainFrame.304"
));
menuDistanceMatrix
.
addActionListener
(
new
ActionListener
()
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
createDistanceMatrix
();
}
});
toolsMenu
.
add
(
menuDistanceMatrix
);
/** Menu to generate constraints from current image session */
menuConstraints
=
new
JMenuItem
(
Messages
.
getString
(
"MainFrame.301"
));
...
...
@@ -996,6 +1006,8 @@ public class MainFrame extends JFrame {
private
Boolean
actionTransformationBmp
;
private
JMenuItem
menuConstraints
;
private
Boolean
actionConstraints
;
private
JMenuItem
menuDistanceMatrix
;
private
Boolean
actionDistanceMatrix
;
private
JMenuItem
menuItemArff
;
private
Boolean
actionArff
;
private
JMenuItem
menuItemRaw
;
...
...
@@ -1113,6 +1125,7 @@ public class MainFrame extends JFrame {
this
.
actionContratsP
=
false
;
this
.
actionCrop
=
false
;
this
.
actionConstraints
=
false
;
this
.
actionDistanceMatrix
=
false
;
this
.
actionFilter
=
false
;
this
.
actionMask
=
false
;
this
.
actionRefresh
=
false
;
...
...
@@ -1143,6 +1156,7 @@ public class MainFrame extends JFrame {
this
.
actionContratsP
=
true
;
this
.
actionCrop
=
true
;
this
.
actionConstraints
=
true
;
this
.
actionDistanceMatrix
=
true
;
this
.
actionFilter
=
true
;
this
.
actionMask
=
true
;
this
.
actionNew
=
true
;
...
...
@@ -1181,6 +1195,7 @@ public class MainFrame extends JFrame {
menuItemMask
.
setEnabled
(
this
.
actionMask
);
menuCrop
.
setEnabled
(
this
.
actionCrop
);
menuConstraints
.
setEnabled
(
this
.
actionConstraints
);
menuDistanceMatrix
.
setEnabled
(
this
.
actionDistanceMatrix
);
menuTransformationBmp
.
setEnabled
(
this
.
actionTransformationBmp
);
menuItemArff
.
setEnabled
(
this
.
actionArff
);
menuItemRaw
.
setEnabled
(
this
.
actionRaw
);
...
...
@@ -2172,6 +2187,15 @@ public class MainFrame extends JFrame {
JOptionPane
.
WARNING_MESSAGE
);
}
}
/**
* Open the dialog window to generate a distance matrix from a data
*/
protected
void
createDistanceMatrix
()
{
DistanceMatrixDialog
dialog
=
new
DistanceMatrixDialog
();
this
.
desktop
.
add
(
dialog
);
dialog
.
toFront
();
}
public
void
doAfterSegmentation
(
Segmentation
seg
,
RawImage
img
)
{
// fenetre et panel du resultat
...
...
src/mustic/gui/dialog/DataToArffDialog.java
View file @
18be25b4
...
...
@@ -17,13 +17,12 @@ import javax.swing.JInternalFrame;
import
javax.swing.JLabel
;
import
javax.swing.JOptionPane
;
import
javax.swing.JPanel
;
import
javax.swing.JSpinner
;
import
javax.swing.JTextField
;
import
jcl.data.Data
;
import
mustic.gui.DataDesktopFrame
;
import
mustic.gui.MainFrame
;
import
mustic.utils.dataExchange.DataArffExchange
;
import
mustic.utils.
io.
dataExchange.DataArffExchange
;
/**
* Fenetre permettant de creer des fichier ARFF à partir d'un image
...
...
@@ -36,9 +35,6 @@ public class DataToArffDialog extends JInternalFrame {
/** liste des images ouvertes */
private
JComboBox
<
String
>
comboData
=
new
JComboBox
<
String
>();
/** nombre de divisions */
private
JSpinner
spinner
=
new
JSpinner
();
/** chemin du fichier que l'on va créer */
private
JTextField
textSave
=
new
JTextField
();
...
...
@@ -105,15 +101,15 @@ public class DataToArffDialog extends JInternalFrame {
panelData
.
add
(
new
JLabel
(
Messages
.
getString
(
"DataToArffDialog.15"
)));
//$NON-NLS-1$
panelData
.
add
(
txtDate
);
panelData
.
add
(
new
JLabel
(
Messages
.
getString
(
"DataToArffDialog.16"
)));
//$NON-NLS-1$
JSpinner
.
NumberEditor
spinnerEditor
=
new
JSpinner
.
NumberEditor
(
this
.
spinner
);
this
.
spinner
.
setEditor
(
spinnerEditor
);
spinnerEditor
.
getModel
().
setMinimum
(
1
);
spinnerEditor
.
getModel
().
setMaximum
(
256
);
spinnerEditor
.
getModel
().
setStepSize
(
1
);
spinnerEditor
.
getModel
().
setValue
(
10
);
panelData
.
add
(
this
.
spinner
);
//
panelData.add(new JLabel(Messages.getString("DataToArffDialog.16"))); //$NON-NLS-1$
//
JSpinner.NumberEditor spinnerEditor = new JSpinner.NumberEditor(
//
this.spinner);
//
this.spinner.setEditor(spinnerEditor);
//
spinnerEditor.getModel().setMinimum(1);
//
spinnerEditor.getModel().setMaximum(256);
//
spinnerEditor.getModel().setStepSize(1);
//
spinnerEditor.getModel().setValue(10);
//
panelData.add(this.spinner);
JPanel
panelOk
=
new
JPanel
();
JButton
buttonOk
=
new
JButton
(
Messages
.
getString
(
"DataToArffDialog.17"
));
//$NON-NLS-1$
...
...
src/mustic/gui/dialog/DistanceMatrixDialog.java
0 → 100644
View file @
18be25b4
package
mustic.gui.dialog
;
import
java.awt.BorderLayout
;
import
java.awt.Dimension
;
import
java.awt.GridLayout
;
import
java.awt.event.ActionEvent
;
import
java.awt.event.ActionListener
;
import
java.io.File
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
javax.swing.JButton
;
import
javax.swing.JComboBox
;
import
javax.swing.JFileChooser
;
import
javax.swing.JInternalFrame
;
import
javax.swing.JLabel
;
import
javax.swing.JOptionPane
;
import
javax.swing.JPanel
;
import
javax.swing.JTextField
;
import
jcl.data.Data
;
import
mustic.gui.DataDesktopFrame
;
import
mustic.gui.MainFrame
;
import
mustic.utils.io.WriteDistancesPath
;
/**
* Fenetre permettant de creer des fichier ARFF à partir d'un image
*
*/
public
class
DistanceMatrixDialog
extends
JInternalFrame
{
private
static
final
long
serialVersionUID
=
1L
;
/** liste des images ouvertes */
private
JComboBox
<
String
>
comboData
=
new
JComboBox
<
String
>();
/** chemin du fichier que l'on va créer */
private
JTextField
textSave
=
new
JTextField
();
private
JTextField
txtDate
;
public
DistanceMatrixDialog
()
{
super
();
JPanel
mainPanel
=
new
JPanel
(
new
BorderLayout
());
JPanel
panelData
=
new
JPanel
(
new
GridLayout
(
4
,
2
));
panelData
.
add
(
new
JLabel
(
Messages
.
getString
(
"DistanceMatrixDialog.0"
)));
//$NON-NLS-1$
DataDesktopFrame
[]
desktopFrames
=
MainFrame
.
getInstance
().
getDesktop
()
.
getAllDataDesktopFrames
();
int
nbSession
=
desktopFrames
.
length
;
for
(
int
i
=
0
;
i
<
nbSession
;
i
++)
{
String
name
=
desktopFrames
[
i
].
getDataSession
().
getTitle
();
this
.
comboData
.
addItem
(
name
);
}
if
(
nbSession
==
0
)
{
JOptionPane
.
showMessageDialog
(
this
,
Messages
.
getString
(
"DistanceMatrixDialog.24"
),
//$NON-NLS-1$
Messages
.
getString
(
"DistanceMatrixDialog.23"
),
JOptionPane
.
WARNING_MESSAGE
);
//$NON-NLS-1$
return
;
}
this
.
comboData
.
setPreferredSize
(
new
Dimension
(
100
,
30
));
panelData
.
add
(
comboData
);
panelData
.
add
(
new
JLabel
(
Messages
.
getString
(
"DistanceMatrixDialog.12"
)));
//$NON-NLS-1$
JPanel
panelSave
=
new
JPanel
(
new
BorderLayout
());
JButton
buttonBrowse
=
new
JButton
(
Messages
.
getString
(
"DistanceMatrixDialog.13"
));
//$NON-NLS-1$
buttonBrowse
.
addActionListener
(
new
ActionListener
()
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
JFileChooser
fileChooser
=
new
JFileChooser
();
DataDesktopFrame
[]
desktopFrames
=
MainFrame
.
getInstance
()
.
getDesktop
().
getAllDataDesktopFrames
();
int
nbSessions
=
desktopFrames
.
length
;
if
(
nbSessions
>
0
)
{
String
name
=
desktopFrames
[
comboData
.
getSelectedIndex
()]
.
getDataSession
().
getData
().
getDataName
();
String
path
=
"~/"
+
name
+
".txt"
;
//$NON-NLS-1$
File
f
=
new
File
(
path
);
fileChooser
.
setSelectedFile
(
f
);
}
int
returnVal
=
fileChooser
.
showSaveDialog
(
DistanceMatrixDialog
.
this
);
if
(
returnVal
==
JFileChooser
.
APPROVE_OPTION
)
{
String
path
=
fileChooser
.
getSelectedFile
().
getPath
();
textSave
.
setText
(
path
);
}
}
});
panelSave
.
add
(
this
.
textSave
,
BorderLayout
.
CENTER
);
panelSave
.
add
(
buttonBrowse
,
BorderLayout
.
EAST
);
panelData
.
add
(
panelSave
);
txtDate
=
new
JTextField
();
DateFormat
formatDate
=
new
SimpleDateFormat
(
"ddMMyy"
);
txtDate
.
setText
(
formatDate
.
format
(
new
Date
()));
panelData
.
add
(
new
JLabel
(
Messages
.
getString
(
"DistanceMatrixDialog.15"
)));
//$NON-NLS-1$
panelData
.
add
(
txtDate
);
// panelData.add(new JLabel(Messages.getString("DataToArffDialog.16"))); //$NON-NLS-1$
// JSpinner.NumberEditor spinnerEditor = new JSpinner.NumberEditor(
// this.spinner);
// this.spinner.setEditor(spinnerEditor);
// spinnerEditor.getModel().setMinimum(1);
// spinnerEditor.getModel().setMaximum(256);
// spinnerEditor.getModel().setStepSize(1);
// spinnerEditor.getModel().setValue(10);
// panelData.add(this.spinner);
JPanel
panelOk
=
new
JPanel
();
JButton
buttonOk
=
new
JButton
(
Messages
.
getString
(
"DistanceMatrixDialog.17"
));
//$NON-NLS-1$
buttonOk
.
addActionListener
(
new
ActionListener
()
{
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
buttonOk_actionPerformed
();
}
});
panelOk
.
add
(
buttonOk
);
mainPanel
.
add
(
panelData
,
BorderLayout
.
NORTH
);
mainPanel
.
add
(
panelOk
,
BorderLayout
.
SOUTH
);
this
.
setContentPane
(
mainPanel
);
this
.
setTitle
(
Messages
.
getString
(
"DistanceMatrixDialog.18"
));
//$NON-NLS-1$
this
.
setSize
(
350
,
175
);
this
.
setResizable
(
true
);
this
.
setMaximizable
(
true
);
this
.
setIconifiable
(
true
);
this
.
setClosable
(
true
);
this
.
setVisible
(
true
);
}
/**
* lance la création du fichier arff
*/
protected
void
buttonOk_actionPerformed
()
{
DataDesktopFrame
[]
desktopFrames
=
MainFrame
.
getInstance
().
getDesktop
()
.
getAllDataDesktopFrames
();
int
nbSessions
=
desktopFrames
.
length
;
if
(
nbSessions
==
0
)
{
JOptionPane
.
showMessageDialog
(
this
,
Messages
.
getString
(
"DistanceMatrixDialog.19"
),
Messages
.
getString
(
"DataToArffDialog.20"
),
//$NON-NLS-1$ //$NON-NLS-2$
JOptionPane
.
WARNING_MESSAGE
);
this
.
dispose
();
}
else
if
(
this
.
textSave
.
getText
().
equals
(
""
))
{
//$NON-NLS-1$
JOptionPane
.
showMessageDialog
(
this
,
Messages
.
getString
(
"DataToArffDialog.22"
),
//$NON-NLS-1$
Messages
.
getString
(
"DistanceMatrixDialog.23"
),
JOptionPane
.
WARNING_MESSAGE
);
//$NON-NLS-1$
}
else
{
Data
data
=
desktopFrames
[
this
.
comboData
.
getSelectedIndex
()]
.
getDataSession
().
getData
();
WriteDistancesPath
.
write
(
data
,
this
.
textSave
.
getText
());
JOptionPane
.
showMessageDialog
(
this
,
Messages
.
getString
(
"DistanceMatrixDialog.44"
),
Messages
.
getString
(
"DataToArffDialog.45"
),
//$NON-NLS-1$ //$NON-NLS-2$
JOptionPane
.
INFORMATION_MESSAGE
);
this
.
dispose
();
}
}
}
src/mustic/gui/dialog/classifier/ConstraintsSelectionDialog.java
View file @
18be25b4
...
...
@@ -60,8 +60,8 @@ import jcl.clustering.constraints.NbClusterConstraint;
import
jcl.data.Data
;
import
jcl.utils.Images.StreamedImageReaderWrapper
;
import
mustic.io.RawImage
;
import
mustic.utils.CSVUtils
;
import
mustic.utils.filters.CSVFileFilter
;
import
mustic.utils.io.CSVUtils
;
/**
* Dialog window that allow the user to generate a set of constraints
...
...
@@ -393,12 +393,12 @@ public class ConstraintsSelectionDialog extends JInternalFrame {
}
private
void
addConstraint
(
List
<
String
>
line
,
boolean
isImageRelated
)
{
switch
(
Integer
.
parseInt
(
line
.
get
(
0
)))
{
switch
(
Integer
.
parseInt
(
line
.
get
(
line
.
size
()-
1
)))
{
case
Constraint
.
MUST_LINK_TYPE
:
try
{
createMustLinkConstraint
();
int
index1
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
1
)),
isImageRelated
);
int
index2
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
2
)),
isImageRelated
);
int
index1
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
0
)),
isImageRelated
);
int
index2
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
1
)),
isImageRelated
);
constraints
.
add
(
new
MustLinkConstraint
(
index1
,
index2
));
currentStep
=
-
1
;
// we update text fields
...
...
@@ -412,8 +412,8 @@ public class ConstraintsSelectionDialog extends JInternalFrame {
break
;
case
Constraint
.
CANNOT_LINK_TYPE
:
try
{
int
index1
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
1
)),
isImageRelated
);
int
index2
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
2
)),
isImageRelated
);
int
index1
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
0
)),
isImageRelated
);
int
index2
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
1
)),
isImageRelated
);
createCannotLinkConstraint
();
constraints
.
add
(
new
CannotLinkConstraint
(
index1
,
index2
));
currentStep
=
-
1
;
...
...
@@ -428,7 +428,7 @@ public class ConstraintsSelectionDialog extends JInternalFrame {
break
;
case
Constraint
.
LABEL_TYPE
:
try
{
int
index
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
1
)),
isImageRelated
);
int
index
=
getIndex
(
Integer
.
parseInt
(
line
.
get
(
0
)),
isImageRelated
);
createLabelConstraint
();
constraints
.
add
(
new
LabelConstraint
(
index
,
Integer
.
parseInt
(
line
.
get
(
2
))));
...
...
src/mustic/gui/dialog/messages_en.properties
View file @
18be25b4
...
...
@@ -133,6 +133,21 @@ DataToArffDialog.44=The file was created successfull.
DataToArffDialog.45
=
Successful
DataToArffDialog.6
=
DataToArffDialog
\=
> Nr. sesiune 1
\=
DataToArffDialog.7=DataToArffDialog
\=
> Nr. sesiune 2
\=
DistanceMatrixDialog.0=Input Data
\:
DistanceMatrixDialog.12
=
Output file
\:
DistanceMatrixDialog.13
=
Browse
DistanceMatrixDialog.15
=
Date (JJMMAA)
\:
DistanceMatrixDialog.17
=
OK
DistanceMatrixDialog.18
=
Distance Matrix
DistanceMatrixDialog.19
=
You must open a data before...
DistanceMatrixDialog.20
=
Warning
DistanceMatrixDialog.22
=
Select a data to save as.
DistanceMatrixDialog.23
=
Warning
DistanceMatrixDialog.24
=
There is no Data currently opened
DistanceMatrixDialog.44
=
The file was created successfull.
DistanceMatrixDialog.45
=
Successful
DistanceMatrixDialog.6
=
DistanceMatrixDialog
\=
> Nr. sesiune 1
\=
DistanceMatrixDialog.7=DistanceMatrixDialog
\=
> Nr. sesiune 2
\=
FilterDialog.1=majority
FilterDialog.2
=
Filter
FilterDialog.3
=
\
Type of filter
\:
...
...
src/mustic/gui/messages_en.properties
View file @
18be25b4
...
...
@@ -161,6 +161,7 @@ MainFrame.30=Create a sub-image...
MainFrame.301
=
Constraints
MainFrame.302
=
Arff to Data
MainFrame.303
=
Data to Arff
MainFrame.304
=
Distance Matrix
MainFrame.31
=
TransformationBmpToRoi...
MainFrame.32
=
Image/Data/ARFF
MainFrame.33
=
Image to ARFF...
...
...
src/mustic/gui/messages_fr.properties
View file @
18be25b4
...
...
@@ -161,6 +161,7 @@ MainFrame.30=Cr
MainFrame.301
=
Contraintes
MainFrame.302
=
Arff en Data
MainFrame.303
=
Data en Arff
MainFrame.304
=
Matrice des distances
MainFrame.31
=
TransformationBmpEnRoi...
MainFrame.32
=
Image/Data/ARFF
MainFrame.33
=
Image en ARFF...
...
...
src/mustic/utils/CSVUtils.java
→
src/mustic/utils/
io/
CSVUtils.java
View file @
18be25b4
package
mustic.utils
;
package
mustic.utils
.io
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
...
...
src/mustic/utils/io/WriteDistancesPath.java
0 → 100644
View file @
18be25b4
package
mustic.utils.io
;
import
java.io.FileNotFoundException
;
import
java.io.PrintWriter
;
import
java.util.Iterator
;
import
jcl.data.Data
;
import
jcl.data.DataObject
;
public
class
WriteDistancesPath
{
public
WriteDistancesPath
()
{}
public
static
void
write
(
Data
data
,
String
path
)
{
Iterator
<
DataObject
>
dataObjectIter_i
=
data
.
iterator
();
DataObject
dataObject1
;
DataObject
dataObject2
;
double
distance
;
int
i
=
0
;
PrintWriter
writer
=
null
;
try
{
writer
=
new
PrintWriter
(
path
);
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
writer
.
println
(
"Number Of DataObjects: "
+
data
.
getNbObjects
()
+
"\n\n"
);
while
(
dataObjectIter_i
.
hasNext
())
{
dataObject1
=
dataObjectIter_i
.
next
();
System
.
out
.
println
(
"\t===> i = "
+
i
);
int
j
=
0
;
Iterator
<
DataObject
>
dataObjectIter_j
=
data
.
iterator
(
i
+
1
,
data
.
getNbObjects
());
while
(
dataObjectIter_j
.
hasNext
())
{
//System.out.println("\t\t " + i + " ===> j = " + (i+1+j));
dataObject2
=
dataObjectIter_j
.
next
();
//distance = DistanceDTWMD.getInstance().compute(attMultiDimSequence1, attMultiDimSequence2, parameterDTW);
distance
=
dataObject1
.
distance
(
dataObject2
);
writer
.
print
(
distance
);
if
(
j
+
1
<
data
.
getNbObjects
())
writer
.
print
(
","
);
else
writer
.
println
();
j
++;
}
i
++;
}
writer
.
flush
();
}
}
src/mustic/utils/dataExchange/DataArffExchange.java
→
src/mustic/utils/
io/
dataExchange/DataArffExchange.java
View file @
18be25b4
package
mustic.utils.dataExchange
;
package
mustic.utils.
io.
dataExchange
;
import
java.io.FileNotFoundException
;
import
java.io.FileOutputStream
;
...
...
@@ -64,6 +64,8 @@ public class DataArffExchange {
writer
.
println
(
"% \""
+
files
+
"\""
);
}
writer
.
println
(
"% >>>"
);
writer
.
println
(
"% Nb objects : "
+
data
.
getNbObjects
());
writer
.
println
(
"% "
);
writer
.
println
(
arffData
);
writer
.
close
();
out
.
close
();
...
...
@@ -97,7 +99,7 @@ public class DataArffExchange {
Instances
subSeq
=
new
Instances
(
sequence
.
attribute
(
i
).
relation
(),
0
);
double
[]
subValues
=
new
double
[((
AttributeMultiDimSequence
)
attr
).
sequence
[
i
].
length
];
for
(
int
j
=
0
;
j
<
((
AttributeMultiDimSequence
)
attr
).
sequence
[
i
].
length
;
j
++)
{
subValues
[
i
]
=
((
AttributeMultiDimSequence
)
attr
).
sequence
[
i
][
j
];
subValues
[
j
]
=
((
AttributeMultiDimSequence
)
attr
).
sequence
[
i
][
j
];
subSeq
.
add
(
new
DenseInstance
(
1.0
,
subValues
));
}
values
[
i
]
=
sequence
.
attribute
(
i
).
addRelation
(
subSeq
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment