📄 labeledfeaturevector.java
字号:
/* * JNI_SVM-light - A Java Native Interface for SVM-light * * Copyright (C) 2005 * Tom Crecelius & Martin Theobald * Max-Planck Institute for Computer Science * * This program 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. * * This program 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 * this program; if not, write to the Free Software Foundation, Inc., 51 * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */package jnisvmlight;/** * A labeled feature vector. * * @author Tom Crecelius & Martin Theobald */public class LabeledFeatureVector extends FeatureVector implements java.io.Serializable { protected double m_label; protected LabeledFeatureVector() { this(0, null, null); } public LabeledFeatureVector(double label, int size) { super(size); this.m_label = label; } public LabeledFeatureVector(double label, int[] dims, double[] vals) { super(dims, vals); this.m_label = label; } public double getLabel() { return m_label; } public void setFeatures(double label, int[] dims, double[] vals) { this.m_label = label; setFeatures(dims, vals); } public void setLabel(double label) { this.m_label = label; } public String toString() { return m_label + " " + super.toString() + "\n"; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -