{"id":24917,"date":"2021-04-13T23:10:04","date_gmt":"2021-04-14T03:10:04","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/basic-numpy-operations-root\/"},"modified":"2021-04-13T23:10:04","modified_gmt":"2021-04-14T03:10:04","slug":"basic-numpy-operations-root","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=24917","title":{"rendered":"Basic Numpy Operations #Root"},"content":{"rendered":"<p>Basic Numpy Operations<\/p>\n<p dir=\"ltr\">import numpy as np<\/p>\n<p dir=\"ltr\">a = np.arange(15).reshape(3, 5)<\/p>\n<p dir=\"ltr\">print(a)<\/p>\n<p dir=\"ltr\">print(a.shape)<\/p>\n<p dir=\"ltr\">print(a.ndim)<\/p>\n<p dir=\"ltr\">print(<a href=\"http:\/\/a.dtype.name\">a.dtype.name<\/a>)<\/p>\n<p dir=\"ltr\">print(a.itemsize)<\/p>\n<p dir=\"ltr\">print(a.size)<\/p>\n<p dir=\"ltr\">print(type(a))<\/p>\n<p dir=\"ltr\">b = np.array([6, 7, 8])<\/p>\n<p dir=\"ltr\">print(b)<\/p>\n<p dir=\"ltr\">type(b)<\/p>\n<p dir=\"ltr\">#<\/p>\n<p> From: https:\/\/sitestree.com\/basic-numpy-operations\/<br \/> Categories:Root<br \/>Tags:<br \/> Post Data:2019-01-05 15:20:17<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Basic Numpy Operations import numpy as np a = np.arange(15).reshape(3, 5) print(a) print(a.shape) print(a.ndim) print(a.dtype.name) print(a.itemsize) print(a.size) print(type(a)) b = np.array([6, 7, 8]) print(b) type(b) # From: https:\/\/sitestree.com\/basic-numpy-operations\/ Categories:RootTags: Post Data:2019-01-05 15:20:17 Shop Online: https:\/\/www.ShopForSoul.com\/ (Big Data, Cloud, Security, Machine Learning): Courses: http:\/\/Training.SitesTree.com In Bengali: http:\/\/Bangla.SaLearningSchool.com http:\/\/SitesTree.com 8112223 Canada Inc.\/JustEtc: http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) Shop Online: &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=24917\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-24917","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":14562,"url":"http:\/\/bangla.sitestree.com\/?p=14562","url_meta":{"origin":24917,"position":0},"title":"Basic Numpy Operations","author":"Sayed","date":"January 5, 2019","format":false,"excerpt":"Basic Numpy Operations import numpy as np a = np.arange(15).reshape(3, 5) print(a) print(a.shape) print(a.ndim) print(a.dtype.name) print(a.itemsize) print(a.size) print(type(a)) b = np.array([6, 7, 8]) print(b) type(b) #","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76075,"url":"http:\/\/bangla.sitestree.com\/?p=76075","url_meta":{"origin":24917,"position":1},"title":"K-Means Clustering","author":"Sayed","date":"May 18, 2024","format":false,"excerpt":"Click on the images to see them clearly #!\/usr\/bin\/env python coding: utf-8 In[1]: k-means clustering from numpy import unique from numpy import where from sklearn.datasets import make_classification from sklearn.cluster import KMeans from matplotlib import pyplot import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-40.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-40.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-40.png?resize=525%2C300 1.5x"},"classes":[]},{"id":24911,"url":"http:\/\/bangla.sitestree.com\/?p=24911","url_meta":{"origin":24917,"position":2},"title":"Pyspark Development Environment #Root","author":"Author-Check- Article-or-Video","date":"April 13, 2021","format":false,"excerpt":"Using Hortonworks HDP: [https:\/\/github.com\/sayedjustetc\/TechnicalArticlesAndCode\/blob\/Pyspark\/pyspark-development-environment] --comes with pyspark However, default python version for Pyspark is 2.7 To change Python version for Pyspark use: export PYSPARK_PYTHON='\/usr\/bin\/python3.6' To make the export permanent, change it on .bash_profile file vi .bash_profile the put the folowing line on .bash_profile export PYSPARK_PYTHON='\/usr\/bin\/python3.6' ---- your HDP by default\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16923,"url":"http:\/\/bangla.sitestree.com\/?p=16923","url_meta":{"origin":24917,"position":3},"title":"Python Libraries for Data Science esp. for NLP &#8211; Natural Language Processing","author":"Sayed","date":"February 14, 2020","format":false,"excerpt":"For NLP tasks, either you will come across these libraries or you will have to use many of these Python libraries. import nltk # tokenizer nltk.download(\"punkt\") # stop words nltk.download(\"stopwords\") from nltk.tokenize import TreebankWordTokenizer from nltk.tokenize import WordPunctTokenizer from nltk.tokenize import RegexpTokenizer from nltk.tokenize import sent_tokenize from nltk.corpus import stopwords\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14575,"url":"http:\/\/bangla.sitestree.com\/?p=14575","url_meta":{"origin":24917,"position":4},"title":"\u09ae\u09c7\u09b6\u09bf\u09a8 \u09b2\u09be\u09b0\u09a8\u09bf\u0982 \u0983 Implement: Multivariate Regression: Python","author":"Sayed","date":"January 7, 2019","format":false,"excerpt":"\u09ae\u09c7\u09b6\u09bf\u09a8 \u09b2\u09be\u09b0\u09a8\u09bf\u0982 \u0983 Implement: Multivariate Regression: Python \u09b6\u09a4 \u09ad\u09be\u0997 \u09b8\u09a0\u09bf\u0995 \u09a8\u09be\u0989 \u09b9\u09a4\u09c7 \u09aa\u09be\u09b0\u09c7\u0964 Theory reference: https:\/\/www.cmpe.boun.edu.tr\/~ethem\/i2ml\/slides\/v1-1\/i2ml-chap5-v1-1.pdf . This is an approximate solution to start with. Understand the theory and then adjust\/fix\/improve import numpy as np import random print('Iterations: rows: Please enter the number of samples for each variable\/dimension') n_number_of_samples_rows =\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76087,"url":"http:\/\/bangla.sitestree.com\/?p=76087","url_meta":{"origin":24917,"position":5},"title":"Python\/ML Correlation Coefficients","author":"Sayed","date":"May 19, 2024","format":false,"excerpt":"df_s_transpose_pearson = df_s_transpose.corr(method = 'pearson', numeric_only = True) df_s_transpose_pearson # Pearson Correlation Coefficient df_s_transpose_pearson = df_s_transpose.corr(method = 'pearson', numeric_only = True) df_s_transpose_pearson Pearson Correlation Coefficient based Adjacency Graph Matrix df_s_transpose_pearson[df_s_transpose_pearson >= 0.5] = 1 df_s_transpose_pearson[df_s_transpose_pearson < 0.5] = 0 df_s_transpose_pearson Create a Graph import networkx as nx Graph_pearson = nx.Graph(df_s_transpose_pearson)\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-44.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-44.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-44.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/05\/image-44.png?resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/24917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24917"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/24917\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24917"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}