工作在Kaggle泰坦尼克號數據集。我試圖更好地理解決策樹,我已經很好地使用了線性迴歸,但從來沒有決策樹。我正在嘗試爲我的樹在Python中創建一個可視化文件。有些東西雖然不起作用。在下面檢查我的代碼。 import pandas as pd
from sklearn import tree
from sklearn.datasets import load_iris
import nump
I'm目前做了大學的項目中,我需要從Kaggle評估數據集: enter image description here 我問題很簡單,但我無法通過研究找出結果: 如果薪水高於或低於50K,Python如何進行比較?問題在於'if-clause'的問題。它總是告訴我這個錯誤:IndexError:字符串索引超出範圍 非常感謝你幫助我! import csv
with open('C:/Users
我想解決Titanic Problem on Kaggle,我不確定如何獲得給定測試數據的輸出。 我成功地訓練網絡,並調用該方法make_prediction(x, test_x) x = tf.placeholder('float', [None, ip_features])
...
def make_prediction(x, test_data):
with tf.Sessio