imdb_success_predictor.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Movie-Success-Predictor 作者: Blueteak 项目源码 文件源码
def create_input(movie_info):
    # don't want to cinlude movie_id, title, country in predicition
    SKIP = 3
    WIDTH = len(movie_info[0]) - SKIP
    X = scipy.zeros((len(movie_info), WIDTH))
    for i in range(0, len(movie_info)):
        for j in range(SKIP, WIDTH):
        try:
                    X[i, j-SKIP] = movie_info[i][j] if movie_info[i][j] != '' else 0
        except Exception:
            pass
    return X
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号