Waikato / moa

MOA is an open source framework for Big Data stream mining. It includes a collection of machine learning algorithms (classification, regression, clustering, outlier detection, concept drift detection and recommender systems) and tools for evaluation.
http://moa.cms.waikato.ac.nz/
GNU General Public License v3.0
603 stars 352 forks source link

MOAObject measureByteSize() could return negative value if the size is > 2^31-1 #271

Open nuwangunasekara opened 1 year ago

nuwangunasekara commented 1 year ago

MOAObject measureByteSize() could return negative value if the size is > 2^31-1:

`

public interface MOAObject extends Serializable {

/**
 * Gets the memory size of this object.
 *
 * @return the memory size of this object
 */
public int measureByteSize();

/**
 * This method produces a copy of this object.
 *
 * @return a copy of this object
 */
public MOAObject copy();

/**
 * Returns a string representation of this object.
 * Used in <code>AbstractMOAObject.toString</code>
 * to give a string representation of the object.
 *
 * @param sb    the stringbuilder to add the description
 * @param indent    the number of characters to indent
 */
public void getDescription(StringBuilder sb, int indent);

} `

nuwangunasekara commented 1 year ago

Patch with relevant changes to support models with size greater than 2^31-1: moa_measureByteSize.patch