/** * Creates a new {@code AbstractGlobalTermWeighter}. */ public AbstractGlobalTermWeighter() { this(SparseVectorFactory.getDefault()); }
public Vector getColumn( int columnIndex ) { int M = this.getDimensionality(); Vector column = SparseVectorFactoryMTJ.getDefault().createVector( M ); column.setElement( columnIndex, this.getElement( columnIndex, columnIndex ) ); return column; }
public Vector getRow( int rowIndex ) { int N = this.getDimensionality(); Vector row = SparseVectorFactoryMTJ.getDefault().createVector( N ); row.setElement( rowIndex, this.getElement( rowIndex, rowIndex ) ); return row; }
/** * Creates a new {@code AbstractCountingBasedGlobalTermWeighter}. */ public AbstractFrequencyBasedGlobalTermWeighter() { this(SparseVectorFactory.getDefault()); }
public Vector getColumn( int columnIndex ) { int M = this.getDimensionality(); Vector column = SparseVectorFactoryMTJ.getDefault().createVector( M ); column.setElement( columnIndex, this.getElement( columnIndex, columnIndex ) ); return column; }
/** * Creates a new {@code LogLocalTermWeighter}. */ public LogLocalTermWeighter() { this(SparseVectorFactory.getDefault()); }
public Vector getRow( int rowIndex ) { int N = this.getDimensionality(); Vector row = SparseVectorFactoryMTJ.getDefault().createVector( N ); row.setElement( rowIndex, this.getElement( rowIndex, rowIndex ) ); return row; }
/** * Creates a new {@code InverseDocumentFrequencyGlobalTermWeighter}. */ public InverseDocumentFrequencyGlobalTermWeighter() { this(SparseVectorFactory.getDefault()); }
public Vector getColumn( int columnIndex ) { int M = this.getDimensionality(); Vector column = SparseVectorFactoryMTJ.getDefault().createVector( M ); column.setElement( columnIndex, this.getElement( columnIndex, columnIndex ) ); return column; }
/** * Creates a new {@code AbstractLocalTermWeighter}. */ public AbstractLocalTermWeighter() { this(SparseVectorFactory.getDefault()); }
public Vector getRow( int rowIndex ) { int N = this.getDimensionality(); Vector row = SparseVectorFactoryMTJ.getDefault().createVector( N ); row.setElement( rowIndex, this.getElement( rowIndex, rowIndex ) ); return row; }
/** * Creates a new {@code NormalizedLogLocalTermWeighter}. */ public NormalizedLogLocalTermWeighter() { this(SparseVectorFactory.getDefault()); }
final Vector result = VectorFactory.getSparseDefault().createVector( this.getParameterCount()); result.setElement(0, this.bias);
/** * Creates a new {@code DominanceGlobalTermWeighter}. */ public DominanceGlobalTermWeighter() { this(SparseVectorFactory.getDefault()); }
final Vector result = VectorFactory.getSparseDefault().createVector( this.getParameterCount()); result.setElement(0, this.bias);
/** * Creates a new {@code NormalizedLogLocalTermWeighter}. */ public NormalizedLogLocalTermWeighter() { this(SparseVectorFactory.getDefault()); }
final Vector result = VectorFactory.getSparseDefault().createVector( this.getParameterCount()); result.setElement(0, this.bias);
/** * Creates a new {@code NormalizedLogLocalTermWeighter}. */ public NormalizedLogLocalTermWeighter() { this(SparseVectorFactory.getDefault()); }
input.assertDimensionalityEquals(d); final Vector gradient = VectorFactory.getSparseDefault().createVector( this.getParameterCount());
/** * Creates a new {@code BinaryLocalTermWeighter}. */ public BinaryLocalTermWeighter() { this(SparseVectorFactory.getDefault()); }