An Automated Hybrid Approach for Feature Classification andNon-Numeric Feature Transformation in Medical AI domain
ZIHENG ZHANG1, HAN FENG1, MINGHUI TANG2,3, KENJI HIRATA2,3, GENKI HATA4,KATSUHIKO OGASAWARA2,5, KOHSUKE KUDO2,3, JUN NAKAYA2,3
1Graduate School of Medicine, Hokkaido University, Sapporo, Japan
2The Medical AI Research and Development Center, Hokkaido University, Sapporo, Japan
3Faculty of Medicine, Hokkaido University, Sapporo, Japan
4Products Development Department, Bathclin Corporation, Ibaraki, Japan
5Faculty of Health Sciences, Hokkaido University, Sapporo, JapanAbstract
In current artificial intelligence (AI) researches utilizing structured data, machine learning algorithms often struggle to handle non-numeric features within structured data which limit theirapplicability. This challenge becomes particularly significant when dealing with medical or health-related data, as the structured data in medicine encompasses not only numerous numeric features
but also various non-numeric features such as ordinal, categorical, datetime, and text features. Converting non-numeric features into a suitable format for machine learning algorithms is essential tofacilitate model training. Conventionally, this process is done manually, which can be subjective, time-consuming and labor-intensive. To address this issue, the aim of our research is to proposes aninnovative hybrid approach based on rules and large language models ChatGPT for automatic feature classification within structured data, and to convert non-numeric features into numericrepresentations that can be effectively utilized by machine learning algorithms. The automation aspect of our method holds great promise in ensuring efficient and accurate handling of diverse nonnumeric data. By leveraging the power of large language models, we expect our approach to streamline the preprocessing of medical and health-related data and enhance the performance of AI
models in clinical applications.

Data and Settings

Introduction
In machine learning, a feature is an individual measurable property or characteristic of aphenomenon. Choosing informative, discriminating and independent features is a crucial element ofeffective algorithms in pattern recognition, classification and regression. When undertaking machinelearning tasks, meticulous feature selection and effective feature engineering are fundamental
determinants for achieving desirable results and augmenting model performance.
However, in current artificial intelligence (AI) researches utilizing structured data, machine learningalgorithms often struggle to handle non-numeric features within structured data which limit theirapplicability. This challenge becomes particularly significant when dealing with medical or healthrelated data, as the structured data in medicine encompasses not only numerous numeric features but
also various non-numeric features such as ordinal, categorical, datetime, and text features.
Converting non-numeric features into a suitable format for machine learning algorithms is essential
to facilitate model training, as these non-numeric features in medical data are likely to containcritical intelligence that can affect outcomes. Conventionally, this process is done manually, which
can be subjective, time-consuming and labor-intensive.

••
•
•
•

Data Source: Bathclin Corporation
Sample Size: 30Features Size: 258
GPT Version: gpt-3.5-turbo
Temperature: 0Methods
Figure 1: Classification of Numeric and Non-numeric Features Based on Rules

Objective
In this study, we aim to proposes an innovative hybrid approach based on rules and large language
models GPT for automatic feature classification within structured data, and to convert non-numericfeatures into numeric features that can be effectively utilized by machine learning algorithms.

Results

Figure 2: Example of Automated Classification Using GPT• First, based on the rule-based approach, we successfully categorized the 258 features of 30
objects into 192 numeric features and 66 non-numeric features.
• Next, utilizing the GPT model, we further classified these 66 non-numeric features into ordinaland categorical features, resulting in 20 ordinal features and 46 categorical features. The
categorical features were assigned values using Label Encoding. For the ordinal features, weutilized GPT once more to reorder them, mapping them to the [0, 1] interval based on linear
relationships.
Figure 3: Example of converting non-numeric features into numeric features

Discussion & Conclusion• The automated numerical conversion method employed in this study ensures the efficient andaccurate processing of a wide array of non-numeric features while simultaneously avoiding
human errors and subjectivity.
• Leveraging the power of large language models streamlines the preprocessing of medical andhealth-related data, holding immense promise to enhance the performance of AI models acrossvarious clinical and health applications, marking a significant stride towards improved
healthcare outcomes and advancements in artificial intelligence

Limitations• Up to this point, this methods can only handle structured data.
• The numerical features of ordinal features involved assigning values in the range [0, 1] based ona linear order. However, this linear relationship may not be applicable in cases where such anorder is not present.