Loading...
HF表格

danupurnomo/dummy-titanic

Titanic (Survived/Not Survi...

标签:


Titanic (Survived/Not Survived) – Binary Classification


How to use

from huggingface_hub import hf_hub_url, cached_download
import joblib
import pandas as pd
import numpy as np
from tensorflow.keras.models import load_model
REPO_ID = 'danupurnomo/dummy-titanic'
PIPELINE_FILENAME = 'final_pipeline.pkl'
TF_FILENAME = 'titanic_model.h5'
model_pipeline = joblib.load(cached_download(
    hf_hub_url(REPO_ID, PIPELINE_FILENAME)
))
model_seq = load_model(cached_download(
    hf_hub_url(REPO_ID, TF_FILENAME)
))


Example A New Data

new_data = {
    'PassengerId': 1191,
    'Pclass': 1, 
    'Name': 'Sherlock Holmes', 
    'Sex': 'male', 
    'Age': 30, 
    'SibSp': 0,
    'Parch': 0, 
    'Ticket': 'C.A.29395', 
    'Fare': 12, 
    'Cabin': 'F44', 
    'Embarked': 'S'
}
new_data = pd.DataFrame([new_data])


Transform Inference-Set

new_data_transform = model_pipeline.transform(new_data)


Predict using Neural Networks

y_pred_inf_single = model_seq.predict(new_data_transform)
y_pred_inf_single = np.where(y_pred_inf_single >= 0.5, 1, 0)
print('Result : ', y_pred_inf_single)
# [[0]]

数据统计

数据评估

danupurnomo/dummy-titanic浏览人数已经达到368,如你需要查询该站的相关权重信息,可以点击"5118数据""爱站数据""Chinaz数据"进入;以目前的网站数据参考,建议大家请以爱站数据为准,更多网站价值评估因素如:danupurnomo/dummy-titanic的访问速度、搜索引擎收录以及索引量、用户体验等;当然要评估一个站的价值,最主要还是需要根据您自身的需求以及需要,一些确切的数据则需要找danupurnomo/dummy-titanic的站长进行洽谈提供。如该站的IP、PV、跳出率等!

关于danupurnomo/dummy-titanic特别声明

本站Ai导航提供的danupurnomo/dummy-titanic都来源于网络,不保证外部链接的准确性和完整性,同时,对于该外部链接的指向,不由Ai导航实际控制,在2023年5月15日 下午3:20收录时,该网页上的内容,都属于合规合法,后期网页的内容如出现违规,可以直接联系网站管理员进行删除,Ai导航不承担任何责任。

相关导航

暂无评论

暂无评论...