MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / SimpleDataSet

Method SimpleDataSet

JSAT/src/jsat/SimpleDataSet.java:24–34  ·  view source on GitHub ↗
(List<DataPoint> dataPoints)

Source from the content-addressed store, hash-verified

22 protected List<DataPoint> dataPoints;
23
24 public SimpleDataSet(List<DataPoint> dataPoints)
25 {
26 if(dataPoints.isEmpty())
27 throw new RuntimeException("Can not create empty data set");
28 this.dataPoints = dataPoints;
29 this.categories = dataPoints.get(0).getCategoricalData();
30 this.numNumerVals = dataPoints.get(0).numNumericalValues();
31 this.numericalVariableNames = new ArrayList<String>(this.numNumerVals);
32 for(int i = 0; i < getNumNumericalVars(); i++)
33 this.numericalVariableNames.add("Numeric Input " + (i+1));
34 }
35
36 public SimpleDataSet(CategoricalData[] categories, int numNumericalValues)
37 {

Callers

nothing calls this directly

Calls 5

getCategoricalDataMethod · 0.80
numNumericalValuesMethod · 0.80
getNumNumericalVarsMethod · 0.80
getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected