All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.asher_stern.crf.function.optimization.ConstantLineSearch Maven / Gradle / Ivy

Go to download

Implementation of linear-chain Conditional Random Fields (CRF) in pure Java

There is a newer version: 1.2.0
Show newest version
package com.asher_stern.crf.function.optimization;

import com.asher_stern.crf.function.Function;

/**
 * A simple inexact and inaccurate non-efficient line search which merely returns a small
 * constant for any input.
 * 
 * @author Asher Stern
 * Date: Nov 7, 2014
 *
 */
public class ConstantLineSearch implements LineSearch
{
	public static final double DEFAULT_RATE = 0.01;
	
	public ConstantLineSearch()
	{
		this(DEFAULT_RATE);
	}
	
	public ConstantLineSearch(double constantRate)
	{
		super();
		this.constantRate = constantRate;
	}


	@Override
	public double findRate(F function, double[] point, double[] direction)
	{
		return constantRate;
	}
	
	
	private final double constantRate;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy