Search in sources :

Example 1 with IntValue

use of org.opensearch.ml.common.dataframe.IntValue in project ml-commons by opensearch-project.

the class MLPredictionOutputTest method setUp.

@Before
public void setUp() {
    ColumnMeta[] columnMetas = new ColumnMeta[] { new ColumnMeta("test", ColumnType.INTEGER) };
    List<Row> rows = new ArrayList<>();
    rows.add(new Row(new ColumnValue[] { new IntValue(1) }));
    rows.add(new Row(new ColumnValue[] { new IntValue(2) }));
    DataFrame dataFrame = new DefaultDataFrame(columnMetas, rows);
    output = MLPredictionOutput.builder().taskId("test_task_id").status("test_status").predictionResult(dataFrame).build();
}
Also used : ColumnMeta(org.opensearch.ml.common.dataframe.ColumnMeta) ArrayList(java.util.ArrayList) ColumnValue(org.opensearch.ml.common.dataframe.ColumnValue) Row(org.opensearch.ml.common.dataframe.Row) DataFrame(org.opensearch.ml.common.dataframe.DataFrame) DefaultDataFrame(org.opensearch.ml.common.dataframe.DefaultDataFrame) IntValue(org.opensearch.ml.common.dataframe.IntValue) DefaultDataFrame(org.opensearch.ml.common.dataframe.DefaultDataFrame) Before(org.junit.Before)

Aggregations

ArrayList (java.util.ArrayList)1 Before (org.junit.Before)1 ColumnMeta (org.opensearch.ml.common.dataframe.ColumnMeta)1 ColumnValue (org.opensearch.ml.common.dataframe.ColumnValue)1 DataFrame (org.opensearch.ml.common.dataframe.DataFrame)1 DefaultDataFrame (org.opensearch.ml.common.dataframe.DefaultDataFrame)1 IntValue (org.opensearch.ml.common.dataframe.IntValue)1 Row (org.opensearch.ml.common.dataframe.Row)1