Python 使用随机林时使用的打印测试集疲劳(X_测试)

Python 使用随机林时使用的打印测试集疲劳(X_测试),python,printing,random-forest,Python,Printing,Random Forest,我将随机林技术应用于以下数据集: gold,Program,MethodType,CallersT,CallersN,CallersU,CallersCallersT,CallersCallersN,CallersCallersU,CalleesT,CalleesN,CalleesU,CalleesCalleesT,CalleesCalleesN,CalleesCalleesU,CompleteCallersCallees,classGold T,chess,Inner,1,0,0,1,0,0,

我将随机林技术应用于以下数据集:

gold,Program,MethodType,CallersT,CallersN,CallersU,CallersCallersT,CallersCallersN,CallersCallersU,CalleesT,CalleesN,CalleesU,CalleesCalleesT,CalleesCalleesN,CalleesCalleesU,CompleteCallersCallees,classGold
T,chess,Inner,1,0,0,1,0,0,1,0,0,0,0,1,0,Trace,
N,chess,Inner,0,1,0,0,1,0,0,1,0,0,0,1,0,NoTrace,
N,chess,Inner,0,1,0,0,1,0,0,1,0,0,0,1,0,NoTrace,
N,chess,Inner,0,1,0,0,1,0,0,1,0,0,0,1,0,Trace,
N,chess,Inner,0,1,0,0,1,0,0,1,0,0,0,1,0,NoTrace,
N,chess,Inner,0,1,0,0,1,0,0,1,0,0,0,1,0,Trace,
N,chess,Inner,0,1,0,0,1,0,0,1,0,0,0,1,0,Trace,
N,chess,Inner,0,1,0,0,1,0,0,1,0,0,0,1,0,NoTrace,
N,chess,Inner,0,1,0,0,1,0,0,1,1,0,1,1,0,Trace,
N,chess,Inner,0,1,0,0,1,0,0,1,1,0,1,1,0,NoTrace,
N,chess,Inner,0,1,0,0,1,0,0,1,1,0,1,1,0,NoTrace,
N,chess,Inner,0,1,0,0,1,0,0,1,1,0,1,1,0,Trace,
N,chess,Inner,0,1,0,0,1,0,0,1,1,0,1,1,0,NoTrace,
T,chess,Inner,1,0,0,1,0,0,1,0,1,1,0,1,0,Trace,
T,chess,Inner,1,0,0,1,0,0,1,0,1,1,0,1,0,Trace,
N,chess,Inner,0,1,0,0,1,0,0,1,1,0,1,1,0,NoTrace,  
完整数据集可在以下位置找到: 我正在尝试打印X_测试,我希望一些值看起来像连续的0和1,有点像这样:0,1,0,1。。。。 问题是,我得到的是打印以下值。如何修复此问题,以及如何检索正在使用的功能的值?它应该是特征的值,是0和1的连续值

[[ 0.33522806 -0.15276826  1.19754674 ... -0.1206594  -0.52441805
  -0.78983714]
 [ 0.33522806 -0.15276826 -0.83504048 ... -0.1206594  -0.52441805
  -0.78983714]
 [ 0.33522806 -0.15276826  1.19754674 ... -0.1206594  -0.52441805
  -0.78983714]
 ...
 [ 0.33522806 -0.15276826 -0.83504048 ... -0.1206594  -0.52441805
  -0.78983714]
 [ 1.65600294 -0.15276826 -0.83504048 ... -0.1206594  -0.52441805
   1.26608379]
 [ 0.33522806 -0.15276826 -0.83504048 ... -0.1206594  -0.52441805
  -0.78983714]]
以下是我正在使用的代码:

import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report, confusion_matrix, accuracy_score
def main():
    X_train={}
    X_test={}
    y_train={}
    y_test={}
    dataset = pd.read_csv( 'InputDataAtLeastOneInstance.txt', sep= ',', index_col=False) 

    #convert T into 1 and N into 0
    
   
    dataset['MethodType'] = dataset['MethodType'].astype('category').cat.codes
   
   
    pd.set_option('display.max_columns', None)

    dataset=dataset.drop(columns=['Program'], axis=1)
    dataset=dataset.drop(columns=['classGold'], axis=1)
    dataset=dataset.drop(columns=['CompleteCallersCallees'], axis=1)

    #print(dataset.head())
    row_count, column_count = dataset.shape
 
    
    X = dataset.iloc[:, 1:column_count].values
    y = dataset.iloc[:, 0].values
    Xcol = dataset.iloc[:, 1:column_count]
    

    
    
    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=1)    
    

    print(X_test)