"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/com/rapidminer/operator/learner/meta/TransformedRegressionModel.java" between
rapidminer-studio-9.4.1-src.tar.gz and rapidminer-studio-9.5.0-src.tar.gz

About: RapidMiner Studio is a code-free environment for designing advanced analytic processes with machine learning, data mining, text mining, predictive analytics and business analytics. Java source.

TransformedRegressionModel.java  (rapidminer-studio-9.4.1-src):TransformedRegressionModel.java  (rapidminer-studio-9.5.0-src)
skipping to change at line 118 skipping to change at line 118
} }
Example example = originalReader.next(); Example example = originalReader.next();
double powered = Math.exp(functionValue); double powered = Math.exp(functionValue);
example.setPredictedLabel(powered / (1 + powered)); example.setPredictedLabel(powered / (1 + powered));
} }
break; break;
case EXP: case EXP:
while (originalReader.hasNext()) { while (originalReader.hasNext()) {
double functionValue = reader.next().getP redictedLabel(); double functionValue = reader.next().getP redictedLabel();
if (zscale) { if (zscale) {
// if(zscale) is quicker and has
less chance of
// numerical errors
functionValue = functionValue * s tddev + mean; functionValue = functionValue * s tddev + mean;
} }
Example example = originalReader.next(); Example example = originalReader.next();
example.setPredictedLabel(Math.log(functi onValue)); example.setPredictedLabel(Math.log(functi onValue));
} }
break; break;
case RANK: case RANK:
while (originalReader.hasNext()) { while (originalReader.hasNext()) {
double predictedRank = reader.next().getP redictedLabel(); double predictedRank = reader.next().getP redictedLabel();
if (zscale) { if (zscale) {
// if(zscale) is quicker and has
less chance of
// numerical errors
predictedRank = predictedRank * s tddev + mean; predictedRank = predictedRank * s tddev + mean;
} }
Example example = originalReader.next(); Example example = originalReader.next();
if (interpolate) { if (interpolate) {
int lower = (int) Math.round(Math .floor(predictedRank)); int lower = (int) Math.round(Math .floor(predictedRank));
int upper = (int) Math.round(Math .ceil(predictedRank)); int upper = (int) Math.round(Math .ceil(predictedRank));
if (lower < 0) { if (lower < 0) {
lower = 0; lower = 0;
} }
if (lower >= rank.length) { if (lower >= rank.length) {
skipping to change at line 169 skipping to change at line 165
} }
if (thisRank >= rank.length) { if (thisRank >= rank.length) {
thisRank = rank.length - 1; thisRank = rank.length - 1;
} }
predictedRank = rank[thisRank]; predictedRank = rank[thisRank];
} }
example.setPredictedLabel(predictedRank); example.setPredictedLabel(predictedRank);
} }
break; break;
case NONE: case NONE:
if (zscale) { while (originalReader.hasNext()) {
while (originalReader.hasNext()) { double functionValue = reader.next().getP
double functionValue = reader.nex redictedLabel();
t().getPredictedLabel() * stddev + mean; if (zscale) {
Example example = originalReader. functionValue = functionValue * s
next(); tddev + mean;
example.setPredictedLabel(functio
nValue);
} }
Example example = originalReader.next();
example.setPredictedLabel(functionValue);
} }
break; break;
default: default:
// cannot happen // cannot happen
break; break;
} }
return exampleSet; return exampleSet;
} }
@Override @Override
public String toString() { public String toString() {
StringBuffer result = new StringBuffer(super.toString() + Tools.g etLineSeparator()); StringBuilder result = new StringBuilder(super.toString() + Tools .getLineSeparator());
result.append("Method: " + METHODS[method] + Tools.getLineSeparat or()); result.append("Method: " + METHODS[method] + Tools.getLineSeparat or());
result.append(model.toString()); result.append(model.toString());
return result.toString(); return result.toString();
} }
@Override @Override
public Model getBaseModel() { public Model getBaseModel() {
return model; return model;
} }
 End of changes. 5 change blocks. 
15 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)