Returns a new version of this data set that is of the same type, and contains a different listing pointing to shallow data point copies. Because the data point object contains the weight itself, the weight is not shared - while the vector and array information is. This allows altering the weights of
()
| 778 | * @return a shallow copy of shallow data point copies for this data set. |
| 779 | */ |
| 780 | public DataSet getTwiceShallowClone() |
| 781 | { |
| 782 | DataSet clone = shallowClone(); |
| 783 | for(int i = 0; i < clone.getSampleSize(); i++) |
| 784 | { |
| 785 | DataPoint d = getDataPoint(i); |
| 786 | DataPoint sd = new DataPoint(d.getNumericalValues(), d.getCategoricalValues(), d.getCategoricalData()); |
| 787 | clone.setDataPoint(i, sd); |
| 788 | } |
| 789 | return clone; |
| 790 | } |
| 791 | |
| 792 | /** |
| 793 | * Returns statistics on the sparsity of the vectors in this data set. |