This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| model = xgb.Booster(model_file='your.model') | |
| model.feature_names = xgtrain.feature_names # Note: xgtrain is your train file with features. | |
| model.feature_types = xgtrain.feature_types | |
| # Number of trees in the model | |
| num_trees = len(model.get_dump()) | |
| # dump all of the trees to tree folder | |
| for tree_index in range(num_trees): | |
| dot = xgb.to_graphviz(model, num_trees=tree_index) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Word Wrapping | |
| @mixin word-wrap() { | |
| -ms-word-break: break-all; | |
| word-break: break-all; | |
| word-break: break-word; | |
| -webkit-hyphens: auto; | |
| -moz-hyphens: auto; | |
| hyphens: auto; | |
| } | |
| .word-wrap { |