<jupyter_start><jupyter_text>xgboost(extreme gradient boosting)<jupyter_code>#optimisation technquie use to optimise the alogorithm
#xgb is similar to gradient boosting frame work but more efficient .it has both linear model solver and tree learning algorithm 
#so, what makes it fast is its capacity to do parallel computation on a single machine.

#this makes xgboost at atleast 10 times faster than existing gradsient boosting implementations.it support various objective functions, 
#including regression,classification and ranking
import numpy as np
import xgboost as xgb
#!pip install xgboost
import os
os.chdir("C:\\Users\\bired\\Desktop\\Ml datasets")
    #dmatrix which is designed gto pass datasets 
    # using libsvm format txt file 
#using numpy 2D array(most popular)
#using XGboost binary buffer file
dtrain=xgb.DMatrix('agaricus.txt.train')
dtest=xgb.DMatrix('agaricus.txt.test')<jupyter_output>[09:21:36] 6513x127 matrix with 143286 entries loaded from agaricus.txt.train
[09:21:36] 1611x127 matrix with 35442 entries loaded from agaricus.txt.test
{'fraction_non_alphanumeric': 0.06672932330827068, 'fraction_numerical': 0.03759398496240601, 'mean_word_length': 5.69811320754717, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '469982', 'license': 'MIT', 'n_tokens_mistral': 353, 'n_tokens_neox': 307, 'n_words': 123, 'path': 'Data-Science-HYD-2k19/Day-based/Day 56.ipynb', 'repo_name': 'Sanjay9921/Python', 'size': '1064'}