Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public abstract class SimFunction<T> implements Serializable{ //extends UDF2<T,T

public static final Log LOG = LogFactory.getLog(SimFunction.class);
protected String name;
protected boolean isNative = false;

public int getNumFeatures() {
return 1;
Expand All @@ -37,10 +36,6 @@ public SimFunction() {
public SimFunction(String name) {
this.name = name;
}
public boolean isNative() {
return this.isNative;
}




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ public SparkFeatureCreators(Map<FieldDefinition, Feature<DataType>> featurers, M
for (SimFunction sf : sfList) {
String outputCol = columnHelper.getColumnName(fd.fieldName, sf.getName(), count);
columnHelper.getColumnsAdded().add(outputCol);
transformers.add(new SparkTransformer(fd.fieldName, new SparkSimFunction(sf), outputCol));
transformers.add(createTransformer(sf, fd.fieldName, outputCol));
count++;
}
}
}

protected SparkTransformer createTransformer(SimFunction sf, String fieldName, String outputCol) {
return new SparkTransformer(fieldName, new SparkSimFunction(sf), outputCol);
}

public void register(SparkSession session) {
for (SparkTransformer t : transformers) {
t.register(session);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import zingg.common.core.model.ModelColumnHelper;
import zingg.common.core.model.ModelGrid;
import zingg.spark.client.SparkFrame;
import zingg.spark.core.similarity.SparkTransformer;

public class SparkMLPipeline implements Serializable {

Expand All @@ -44,7 +43,7 @@ public class SparkMLPipeline implements Serializable {
private LogisticRegression lr;
private Transformer transformer;
private VectorValueExtractor vve;
protected ModelColumnHelper columnHelper;
private ModelColumnHelper columnHelper;

public SparkMLPipeline() {
}
Expand Down
Loading