<commit_before>/**
    This file is part of JkernelMachines.

    JkernelMachines is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    JkernelMachines is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with JkernelMachines.  If not, see <http://www.gnu.org/licenses/>.

    Copyright <NAME> - 2010

*/
package fr.lip6.jkernelmachines.classifier;

import java.util.Collections;
import java.util.List;

import fr.lip6.jkernelmachines.kernel.typed.DoubleLinear;
import fr.lip6.jkernelmachines.type.TrainingSample;
import fr.lip6.jkernelmachines.type.TrainingSampleStream;

/**
 * <p>
 * Linear SVM classifier using stochastic gradient descent algorithm
 * </p>
 * 
 * <p>
 * <b>Large-Scale Machine Learning with Stochastic Gradient Descent</b><br />
 * <NAME><br />
 * <i>Proceedings of the 19th International Conference on Computational Statistics (COMPSTAT'2010)</i>
 * </p>
 * 
 * @author picard
 *
 */
public class DoubleSGD implements Classifier<double[]>, OnlineClassifier<double[]> {

	// Available losses
	/** Type of loss function using hinge */
	public static final int HINGELOSS = 1;
	/** Type of loss function using a smoothed hinge */
	public static final int SMOOTHHINGELOSS = 2;
	/** Type of loss function using a squared hinge */
	public static final int SQUAREDHINGELOSS = 3;
	/** Type of loss function using log */
	public static final int LOGLOSS = 10;
	/** Type of loss function using margin log */
	public static final int LOGLOSSMARGIN = 11;<commit_msg>implement serializable<commit_after>/**
    This file is part of JkernelMachines.

    JkernelMachines is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    JkernelMachines is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with JkernelMachines.  If not, see <http://www.gnu.org/licenses/>.

    Copyright <NAME> - 2010

*/
package fr.lip6.jkernelmachines.classifier;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

import fr.lip6.jkernelmachines.kernel.typed.DoubleLinear;
import fr.lip6.jkernelmachines.type.TrainingSample;
import fr.lip6.jkernelmachines.type.TrainingSampleStream;

/**
 * <p>
 * Linear SVM classifier using stochastic gradient descent algorithm
 * </p>
 * 
 * <p>
 * <b>Large-Scale Machine Learning with Stochastic Gradient Descent</b><br />
 * <NAME><br />
 * <i>Proceedings of the 19th International Conference on Computational Statistics (COMPSTAT'2010)</i>
 * </p>
 * 
 * @author picard
 *
 */
public class DoubleSGD implements Classifier<double[]>, OnlineClassifier<double[]>, Serializable {

	private static final long serialVersionUID = 3245177176254451010L;
	
	// Available losses
	/** Type of loss function using hinge */
	public static final int HINGELOSS = 1;
	/** Type of loss function using a smoothed hinge */
	public static final int SMOOTHHINGELOSS = 2;
	/** Type of loss function using a squared hinge */
	public static final int SQUAREDHINGELOSS = 3;
	/** Type of loss function using log */
	public static final int LOGLOSS = 10;
	/** Type of loss function using margin log */
	public static final int LOGLOSSMARGIN = 11;
{'fraction_non_alphanumeric': 0.08102667337695017, 'fraction_numerical': 0.015853044791142426, 'mean_word_length': 3.8773006134969323, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6341260', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1087, 'n_words': 455}