- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中weka.core.WekaException
类的一些代码示例,展示了WekaException
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WekaException
类的具体详情如下:
包路径:weka.core.WekaException
类名称:WekaException
[英]Class for Weka-specific exceptions.
[中]类,用于特定于Weka的异常。
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Initialize the step
*
* @throws WekaException if the data to output has not been set yet
*/
@Override
public void stepInit() throws WekaException {
if (m_instances == null) {
throw new WekaException(
"Has not been initialized with a set of instances");
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Constructor with message and cause
*
* @param message the message for the exception
* @param cause the root cause Throwable
*/
public WekaException(String message, Throwable cause) {
this(message);
initCause(cause);
fillInStackTrace();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Get an ID string for this flow. The ID is made up of the FlowName + "_" +
* the hashcode generated from the JSON representation of the flow.
*
* @return
*/
public String getFlowID() {
String ID = getFlowName();
try {
ID += "_" + toJSON().hashCode();
} catch (WekaException ex) {
ex.printStackTrace();
}
return ID;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
throw new WekaException("Incorrect type of algorithm");
new WekaException(
"Can't have both instance and batch-based incomming connections!");
cause.fillInStackTrace();
getStepManager().logError(cause.getMessage(), cause);
throw new WekaException(cause);
代码示例来源:origin: Waikato/weka-trunk
/**
* Initialize the step being managed
*
* @return true if the initialization was successful
*/
protected boolean initStep() {
boolean initializedOK = false;
m_stepIsBusy = false;
m_stopRequested = false;
m_stepIsFinished = false;
try {
getManagedStep().stepInit();
// getManagedStep().init();
initializedOK = true;
} catch (WekaException ex) {
logError(ex.getMessage(), ex);
} catch (Throwable ex) {
logError(ex.getMessage(), ex);
}
m_throughput = null;
return initializedOK;
}
代码示例来源:origin: Waikato/weka-trunk
throw new WekaException("Incorrect type of algorithm");
new WekaException(
"Can't have both instance and batch-based incomming connections!");
cause.fillInStackTrace();
getStepManager().logError(cause.getMessage(), cause);
throw new WekaException(cause);
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Initialize the step being managed
*
* @return true if the initialization was successful
*/
protected boolean initStep() {
boolean initializedOK = false;
m_stepIsBusy = false;
m_stopRequested = false;
m_stepIsFinished = false;
try {
getManagedStep().stepInit();
// getManagedStep().init();
initializedOK = true;
} catch (WekaException ex) {
logError(ex.getMessage(), ex);
} catch (Throwable ex) {
logError(ex.getMessage(), ex);
}
m_throughput = null;
return initializedOK;
}
代码示例来源:origin: Waikato/weka-trunk
@SuppressWarnings("unchecked")
@Override
public void restoreData(Object data) throws WekaException {
if (!(data instanceof List)) {
throw new WekaException("Was expecting an instance of a List");
}
m_data = ((List<Data>) data);
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Constructor with message and cause
*
* @param message the message for the exception
* @param cause the root cause Throwable
*/
public WekaException(String message, Throwable cause) {
this(message);
initCause(cause);
fillInStackTrace();
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Start the managed step processing
*/
protected void startStep() {
try {
getManagedStep().start();
} catch (WekaException ex) {
interrupted();
logError(ex.getMessage(), ex);
} catch (Throwable ex) {
interrupted();
logError(ex.getMessage(), ex);
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Get an ID string for this flow. The ID is made up of the FlowName + "_" +
* the hashcode generated from the JSON representation of the flow.
*
* @return
*/
public String getFlowID() {
String ID = getFlowName();
try {
ID += "_" + toJSON().hashCode();
} catch (WekaException ex) {
ex.printStackTrace();
}
return ID;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
@SuppressWarnings("unchecked")
@Override
public void restoreData(Object data) throws WekaException {
if (!(data instanceof List)) {
throw new WekaException("Was expecting an instance of a List");
}
m_data = ((List<Data>) data);
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Start the managed step processing
*/
protected void startStep() {
try {
getManagedStep().start();
} catch (WekaException ex) {
interrupted();
logError(ex.getMessage(), ex);
} catch (Throwable ex) {
interrupted();
logError(ex.getMessage(), ex);
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Initialize the step
*
* @throws WekaException if the data to output has not been set yet
*/
@Override
public void stepInit() throws WekaException {
if (m_instances == null) {
throw new WekaException(
"Has not been initialized with a set of instances");
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Have the managed step process the supplied data object
*
* @param data the data for the managed step to process
*/
protected void processIncoming(Data data) {
try {
getManagedStep().processIncoming(data);
} catch (WekaException ex) {
interrupted();
logError(ex.getMessage(), ex);
} catch (Throwable e) {
interrupted();
logError(e.getMessage(), e);
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Restore the data (plots) for this step
*
* @param data the data to set
* @throws WekaException if a problem occurs
*/
@SuppressWarnings("unchecked")
@Override
public void restoreData(Object data) throws WekaException {
if (!(data instanceof Object[])) {
throw new WekaException("Argument must be a three element array, "
+ "where the first element holds a list of Plot2D objects, the "
+ "second a list of Instances objects and the third "
+ "a boolean - true if the data is threshold data");
}
m_plots = ((List<PlotData2D>) ((Object[]) data)[0]);
// m_offscreenPlotData = ((List<Instances>) ((Object[]) data)[1]);
m_dataIsThresholdData = ((Boolean) ((Object[]) data)[1]);
m_offscreenPlotData = new ArrayList<Instances>();
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Have the managed step process the supplied data object
*
* @param data the data for the managed step to process
*/
protected void processIncoming(Data data) {
try {
getManagedStep().processIncoming(data);
} catch (WekaException ex) {
interrupted();
logError(ex.getMessage(), ex);
} catch (Throwable e) {
interrupted();
logError(e.getMessage(), e);
}
}
代码示例来源:origin: Waikato/weka-trunk
/**
* Restore the data (plots) for this step
*
* @param data the data to set
* @throws WekaException if a problem occurs
*/
@SuppressWarnings("unchecked")
@Override
public void restoreData(Object data) throws WekaException {
if (!(data instanceof Object[])) {
throw new WekaException("Argument must be a three element array, "
+ "where the first element holds a list of Plot2D objects, the "
+ "second a list of Instances objects and the third "
+ "a boolean - true if the data is threshold data");
}
m_plots = ((List<PlotData2D>) ((Object[]) data)[0]);
// m_offscreenPlotData = ((List<Instances>) ((Object[]) data)[1]);
m_dataIsThresholdData = ((Boolean) ((Object[]) data)[1]);
m_offscreenPlotData = new ArrayList<Instances>();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
@SuppressWarnings("unchecked")
@Override
public void restoreData(Object data) throws WekaException {
if (!(data instanceof List)) {
throw new WekaException("Argument must be a List<PlotData2D>");
}
m_plots = (List<PlotData2D>) data;
// need to generate the outgoing Image data...
for (PlotData2D pd : m_plots) {
createOffscreenPlot(pd);
}
}
代码示例来源:origin: Waikato/wekaDeeplearning4j
@Override
protected Instances determineOutputFormat(Instances inputFormat) throws Exception {
try(ObjectInputStream ois = new ObjectInputStream(new FileInputStream(modelFile))){
model = (Dl4jMlpClassifier) ois.readObject();
return model.getActivationsAtLayer(transformationLayerName, inputFormat);
} catch (IOException e) {
throw new WekaException("Could not read model file: " + modelFile.getAbsolutePath());
}
}
本文整理了Java中weka.core.WekaException.initCause()方法的一些代码示例,展示了WekaException.initCause()的具体用法。这些代码示例主要来源于
本文整理了Java中weka.core.WekaException.printStackTrace()方法的一些代码示例,展示了WekaException.printStackTrace()的具体用法
本文整理了Java中weka.core.WekaException.()方法的一些代码示例,展示了WekaException.()的具体用法。这些代码示例主要来源于Github/Stackoverfl
当我尝试打印实例数时,它显示为 0(零)。但是当我使用 Weka API 手动选择 ARFF 文件时,我的训练数据中有 565 个实例。我想找出错误所在。谢谢。 private static void
我是一名优秀的程序员,十分优秀!