Skip to content

Commit

Permalink
Version 1.2.2
Browse files Browse the repository at this point in the history
- Some minor bugs fixed in ImportMatlab and ExportMatlab
- Minor bug fixed with TSK coefficients and Aggregation PROD

Signed-off-by: sotillo19 <[email protected]>
  • Loading branch information
sotillo19 committed Jun 8, 2018
1 parent 61e6dd7 commit 3966ed5
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
Binary file added Examples/lib/JFML-v1.2.2.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions buildJAR.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<property name="classes" location="bin"/>
<property name="lib" location="Examples/lib"/>
<property name="Name" value="JFML"/>
<property name="version" value="1.2.1"/>
<property name="version" value="1.2.2"/>

<target name="init">
<!-- Create the classes directory structure used by compile -->
Expand All @@ -21,7 +21,8 @@
<!-- Create the distribution directory -->
<mkdir dir="${lib}"/>
<!-- Put everything in ${classes} into the jar file -->
<jar jarfile="${lib}/${Name}-v${version}.jar" basedir="${classes}" manifest="manifest.mf"/>
<jar jarfile="${lib}/${Name}-v${version}.jar" basedir="${classes}" manifest="manifest.mf"
excludes = "**/interoperatibility/**"/>
</target>

<target name="clean" description="clean classes and lib directories" >
Expand Down
2 changes: 1 addition & 1 deletion src/jfml/compatibility/ExportPMML.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
import jfml.term.TskTermType;

/**
* This class allows to export a fuzzy system in format FML to MATLAB format
* This class allows to export a fuzzy system in format PMML
*
* @author Jose Alonso
*
Expand Down
7 changes: 5 additions & 2 deletions src/jfml/compatibility/ImportMatlab.java
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ public FuzzyInferenceSystem importFuzzySystem(String path) throws java.io.IOExce
if (type.equals("mamdani"))
ft[k] = new FuzzyTermType(tname, FuzzyTermType.TYPE_singletonShape, pp);
} else if (ttype.equals("linear")) {
//System.out.println("linear MF");
pp= this.fillParameters(aux, true);
// this is only for TSK-order1
}
Expand Down Expand Up @@ -835,13 +836,15 @@ public float[] fillParameters(String line, boolean linear) {
String[] params= line.split(" ");
float[] result= new float[params.length];
if (linear) {
result[params.length-1]= (new Float(params[0])).floatValue();
//System.out.println(line);
//result[params.length-1]= (new Float(params[0])).floatValue();
result[0]= (new Float(params[params.length-1])).floatValue();
} else {
result[0]= (new Float(params[0])).floatValue();
}
for (int m=0; m<params.length-1; m++) {
if (linear) {
result[m]= (new Float(params[m+1])).floatValue();
result[m+1]= (new Float(params[m])).floatValue();
} else {
result[m+1]= (new Float(params[m+1])).floatValue();
}
Expand Down
4 changes: 3 additions & 1 deletion src/jfml/knowledgebase/variable/TskVariableType.java
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ private float combination() {
v= weightedAverage(this.z);
}
else if(comb.contains("custom"))
v= customCombination(this.z);
v= customCombination(this.z);
else
v = defaultValue;

return v;
}
Expand Down
4 changes: 2 additions & 2 deletions src/jfml/rule/Rule.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ private float bdif(float a, float b){
* @return
*/
private float prod(float[] degrees) {
float res=0;
float res=degrees[0];

for(int i=0;i<degrees.length;i++)
for(int i=1;i<degrees.length;i++)
res*=degrees[i];

return res;
Expand Down

0 comments on commit 3966ed5

Please sign in to comment.