Need guidance to move from smile-core 4.1.0 to 4.2.0.
I am trying to move from smile-core 4.1.0 to 4.2.0. I encountered the following message in Eclipse-Java. I am not sure if this is a bug. More likely incompatible dependencies in my Maven set up. I need some guidance.
I am using JavaSE-21.
Thanks in advance, Wern
Exception in thread "Thread-1" java.lang.NoSuchFieldError: Class smile.data.type.DataTypes does not have member field 'smile.data.type.IntegerType IntegerType' at tech.tablesaw.conversion.smile.SmileConverter.toSmileType(SmileConverter.java:70)
I have the following dependencies.
The above error pointed to the part when I tried to convert tablesaw to smile using table.smile().toDataFrame(). Does that mean the SmileConverter in tablsaw is no longer matching with smile-core of 4.2.0?
I think I found the cause but I am not sure if I know how to make them compatible. I think SmileConverter in tablesaw-core has not been updated to handle IntType. It is converting "INTEGER" to IntegerType instead of IntType and smile-core 4.2.0 does not have IntegerType. Please kindly advise what to do. Thanks in advance.
Wern
In 4.1.0 of smile-core, public class DataTypes { /** Boolean data type. / public static final smile.data.type.BooleanType BooleanType = smile.data.type.BooleanType.instance; /* Char data type. / public static final smile.data.type.CharType CharType = smile.data.type.CharType.instance; /* Byte data type. / public static final smile.data.type.ByteType ByteType = smile.data.type.ByteType.instance; /* Short data type. / public static final smile.data.type.ShortType ShortType = smile.data.type.ShortType.instance; /* Integer data type. */ public static final IntegerType IntegerType = smile.data.type.IntegerType.instance; ......
In 4.2.0 of smile-core, public class DataTypes { /** Boolean data type. / public static final smile.data.type.BooleanType BooleanType = new smile.data.type.BooleanType(false); /* Char data type. / public static final smile.data.type.CharType CharType = new smile.data.type.CharType(false); /* Byte data type. / public static final smile.data.type.ByteType ByteType = new smile.data.type.ByteType(false); /* Short data type. / public static final smile.data.type.ShortType ShortType = new smile.data.type.ShortType(false); /* Integer data type. */ public static final smile.data.type.IntType IntType = new smile.data.type.IntType(false); ......
DataFrame is fully re-designed with smile 4.2. Please check out Data Processing for a tutorial of the new API. You should be able to do what you can do with pandas or tablsaw.
Thanks for the quick reply. I have read the Data Processing page. I think I can make it working by doing my own conversion from tablesaw to dataFrame of Smile. However, I was hoping I could just call the SmileConverter or similar method, just like 4.1.0 or earlier version. I will look into my own conversion while waiting for the other thread (https://github.com/jtablesaw/tablesaw/issues/1295) to reply. Thanks a lot.