Plain and Simple Estimators

Plain and simple estimators


Machine learning is amazing, while it doesn't force you to do advanced math. The tools for machine learning have improved dramatically, and training your own model has never been easier.


We use our understanding of our dataset rather than an understanding of raw mathematics as a model code that we gain insights into.


In this episode, we're going to train a simple classifier using a handful of lines of code. Here are all the codes we see today.


Tensor flow estimators for machine learning

We use TenserFlow, Google's open-source machine learning library, to train our classifiers. Tensorflow has a very large API surface, but we are going to focus on high-level APIs, called estimators.


I have printed our loading results and we can see that we are now able to access the training data and related labels, or using targeted, named attributes.


Build a model


Next we will build the model. To do this, we will first set up feature columns. Feature columns define the types of data that come in the model. We're using dimen dimension feature columns to represent our features, and call them "full_features".

The estimators package the training loop for us, so that we can train this model by configuring it without coding manually. It takes up a lot of boilerplate, allowing us to think at a higher level of abstraction. This means we will play with the fun parts of machine learning, and not dive into too many details.


Because we've only covered linear models so far, we stick here. We will look at this example again to expand its capabilities in the future.



Flower classification: as interesting as wine vs. beer?


This week we will create a model to differentiate between three different of the same flower. I found it a little more fun than the previous episode of beer and wine, but it's a little harder to separate these flowers, which made it even more fun.


In particular, we are classifying different species of iris flowers. Now, I'm not sure if I can get Iris flowers from the rose area, but our model aims to distinguish Iris Setosa, Iris Versicolor, and Iris Virginica.


Making our model using estimators is quite simple. Using f Tf.estimator.LinearClassifier`, we can set up the model by crossing over the newly created feature columns; The numbers of different outputs predicted by the model in this case; And a directory for storing model progress and output files. This helps the TensorFlow to go back to training where it left off, if necessary.



Input functions


This classification item will keep track of our state, and we are now almost ready to move on to training. There is one last piece to connect our model in training mode, and that is the input function. The function of the input function is to create TensorFlow operations that generate data for the model.


We have a dataset measuring the height and width of the petals and snails of these flowers. These col columns serve as our 'features'.


Load data


After importing TensorFlow and NumPy, we will load our dataset, using TensorFlow's Load_CSV_Wid_Header function. Data, or features, are presented as floating-point numbers, and are recorded as 'labels', or targeted, integers for each row of data: 0, 1, or 2, corresponding to 3 species of flowers.



So we move from the raw data to the input function, which passes the data, which is mapped by the Fedom columns to the model. Note that we use the same name for features as we did when defining feature columns. This is how data is related.



Run the training


Now is the time to run our training. To train our model, we will run classified. train (), with only input classified as classified. This is how we connect to our datasets and models.


The train function handles the training loop and repeats over the dataset, improving its performance with each step. And so, we've completed 1,000 training steps! Our dataset is not large, so it was completed rather quickly.


Evaluation time


Now it's time to evaluate our results. We can do this first using the same classifier object, as this is the trained state of the model. To determine how good our model is, we use classifiers. (F) We pass our test datasets and extract the accuracy from the returned metrics.


We got a purity of 96.6.66%! Nothing bad!








Estimators: A straightforward workflow


Let’s pause here for this week, and review what we’ve achieved so far using Estimators.


The Estimators API gives us a better workflow for retrieving our raw data, passing it through input functions, setting up our facility columns and model structures, running our training, and running our running. This easy to understand framework allows us to think about our data and its properties, compared to the underlying mathematics which is the best place!


Links


Comments

Popular posts from this blog

Artificial intelligence (AI) - the ability of a digital computer.

What is SEO and how to do search engine optimization?

Facebook's name has been changed to 'rebranding'

Labels

Artificial Intelligence and a Social media Facebook What are on you phone This mobile your IT Android Nepal internet Do can for smartphone use with workforce app be media from social iPhone new robot why does will not Apple Machine Learning data Python that these Now YouTube account by company computer feature like or password ChatGPT Whatsapp digital twitter Instagram Tiktok machine without work US an has information make online way China Future Know find free out people search video videos If One battery website Here India Intelligence Laptop ML Microsoft apps corona features may phones photos protect public service smart user users year Avoid Elon Musk Have billion cyber market million money need network update which world Buy Windows about after chrome education history home photo system want 10 Bitcoin Content Did Machine Learning Future Nepali Operators SEE Scientists Things Wi-Fi artificial browser code don't down download hacker hacking many safe security take tips when Amazon Artificial Intelligence Future Cryptocurrency GPS Gmail Learning TV Who being cloud going human its launched life malware mind netflix software study their there two used version where 15 7 Beginners Deep Learning Keep Messages More NASA Privacy Than Top also as at available bank become business camera career change chat countries digital marketing easy first hacked jobs look marketing meta millions monetization most number price sent settings store such virus while work force 5 Agriculture Bug Deep Development Earth Everyone Gemini Google Maps Here's Kaggle RAM Risk Samsung So Some Types Ways Windows 11 World Cup Xiaomi address all attack been brain buying chip dangerous difference drive earn email files get go good government hackers hidden image including job language message mode news old open passwords pay play problems really saying search engine smartphones storage story them up using watch we windows 10 working 14 17 2020 2022 4 6 Based Cambridge Dark Web Deepfake Electric Elon Even GB GPT Global Health-care Lite Maps Must OpenAI Oppo Pakistan PayPal Print Pro QR Reasons SEO SMS Telegram TensorFlow Thinking Tutorial Type Typing Vision WiFi Word Zoom accounts advertising age any best better biggest blue care charging comments companies computers could country created cyber attacks days deleted doing electricity emails engine ethics eyes fake football function gadgets game games gets glasses hours humans increase install launch location lost medical memory misused monitor moon name once only own percent post posts private problem processing program quantum quickly robotics robots run safety says scan science screen secret secure send share should signal space stay students target they thousands time topics tricks useful viral voice war was water web wireless workers worldwide years 000 100 200 2024 30 35 5G AI Education Alan Musk America Analytica Applications Army Assistant Banned Because Before Blockchain Bounty CCTV COVID-19 Chat GPT China's Chinese Choose Clean Close Clubhouse Computer Vision Crypto DL DNS Developer Docs EV Economic Explain Factory Finally Google chrome Google drive Healthcare Help I IBM Includes Japan Keras Kernels Large Lifestyle Looking MDMS Mac Models Music Musk Natural Ncell Nepal's Nepalis Net Notebooks Operating PC Police Preparing Prime Revolution Russia SIM Save Scikit-Learn Skills SpaceX Stephen Hawking Sun Tesla Theme Therefore Trump Unnecessary VPN Variables Visas WorldLink ability ads air airplane along among another attention authentication autocorrect aware background bandwidth becoming beneficial between blocked break bring browsing bully cable call cameras cannot captions capture cause center charge charger chatbots check children come coming complete consumption control copyright corona-virus courses create crimes currency cyber security dataset datasets day delete deleting details developed device different dislike doctor documents domain due during dynamic each easier easily employee employees energy engineer engineering exactly excessive expected extend factor facts family fix forever forget found fraud friends full getting given got guest hand handle hear heater his iOS iOS 26 iPhone 14 iPhones impact important incognito income industry insecure into invest keyboard known law learn list listen live main making manager map meaning meanings megapixel messenger model month months movies much nonsense nuclear off opening operated original other our over phishing physics porn prevent product production programming protection question ready real real-world reduce rejected released remove report reward room ruining same saving say scandal searched secretly selfie show side site sold solve someone sound source speaking special speed spyware stuck subscription systems talent techology television tick today too torrent traffic trick trillion true universe upload various verification weakest weapon women won't young "Nano Banana" $100 & 'Buy the Dip' 'HDR' 'Hey Google' 'Hey Siri' 'I' 'Mr. Beast' 'Professional Mode' 'Trash' folder 'football intelligence' 'hidden' 'refill station' (IoT) (LLM) (NLP) 1 10:10 10th 11 12 145 16 19 2 20 2007 25 300 3D 40 4000 46% 48 4K 5 P's 60 7 C's 78% 8 8.5 80% 90% @everyone on A17 AI Tool AI ethics AI-Based AI-powered API AR Adjust Adobe Adopt Adsense Adsense Supports Africa Alexa Algorithms Ali Baba Altman Amazon Jungle Amazon Prime Ambani American Anaconda Android 11 Android TV Android phone Android's Annoyed Anthropology Apply Appoints Arithmetic Art Art through NFTs Artficial Intelligence Artificial neural Artuficial Intellegence Ashika Tamang Assignment Astronauts Astronomy Atrificial Inteligence Attacks Audiobooks Augmented Reality Australia Auto-GPT AutoML Avatar 2 Bachelors Banning Bard AI BeiDou Bernie Sanders Beyond Big data BigQuery Bill Gates Bitwise Blind Blockchain Developer Blockchain Technology Books Brave Brave Browser Brazil Browser's Bumble C charger CEO CPU CPU temperature CTEVT CV Cases Casting Changed ChatGBT Chery Citroën C5 Cloud Factory Cloud Factory Nepal Club House Colab Command Comparison Compute Concatenate Concerns Contactless Contactless payment system Copa America Copilot Couple Challenge Crash test Create your first Project on Python Crossover Cup Cybersecurity DRS Gaming Dark mode Datalab Dating Deep Fake Deep Learinig Deep Learning with Python Deep Neural Networks Defender Demat Department Dept Development in predictive analytics Didn't Digital avatars Disable Discontinuing Discovers Do not Dodge Dogecoin Drones DuckDuckGo E-task EA ETF EU EVs Earbuds Earth 2 Earthquake Edge Computing El Salvador Elected Electric Vehicles Electrical Eliminate Embassy Embedded Application Embedded Application (EA) Emoji Epstein Epstein’s Estimators Ethical Hacking Euro NCAP European Evolve Explained Explosion Express WiFi FPS Facebook Messenger Facebook's Facets Fears Federal Reserve System Finance Finding Firefox Fitbit FiveG Fixed wireless Follow Forge Fraud Call Freefire Freelancing GIF GPU Gadget Galaxy Gboard Germany Git Giving Glass Gold Google Chat Google Cloud Google Meet Google Play Music Google Plus Google Plus code Google Workspace Google search Google's Green room Greenroom. Spotify Grok Guest Mode HDMI Habitable Happy Birthday Health sector Heights Holi Honest Honeygain Hosted Hour Huawei Hub Hyundai I'll I'm ID IMD IP IPO ISP Identify Implementing Increasing Index Indonesia Inflation InfoSec Input Inspiration Installation Instead Integrated circuit Intel Intelligent Internet of Things (IoT) Introduction Iran Iranian Iranians communicating Island Isn't JBL JPG JPMorgan Chase & Co Jack Ma James January JavaScript Jeffrey Jio Joker Virus Journalism Jungle Jupyter Jupyter Notebooks Kathmandu Keys Korean LAN LLM LP Large Language Models Launch of better autonomous systems Lee Kun-hee Library Liking Line Linux Liquid Logical Lucky MDMS Nepal ML Engine MSN MaAfee MacBook Mark Zuckerberg Max Meet Membership Mero Share Metaverse Microsoft Office Microsoft Teams Military Military weapons Minister Missiles Mobile Operating System Module Moltbook Mouse Mukesh Ambani Musk's Musk’s data NASA's NEA NFT NFTs Natural language processing (NLP) Navigation Nepal. radio mapping Nepali businesses Nepali game Nepali youth NetTV Neural Network Neural Networks New Technology No Nokia North Korea Note Nvidia Object Detection Open-source OpenAI's Opera Outlook Outsourcing PDF PNG PPT PUBG Pandas Pandora Parent Paytm Pendrive Photoshoot Pi Network Pip Plan Planets Play Store Pokémon Pokémon Go Precision Premium Preparations Prerequisite Pro's Process Process discovery Pycharm Pyenv Python Programming Python Tutorial Python Tutorials Python for Beginners Python on Windows Quick Draw RCS Race Radically Raise Ransomware Rashtra Bank Reboot Recommender Recommender Systems Redmi Reinforcement Reinforcement learning Reliable Reliance Reliance Jio Remittances Remotely Remove. bg Replacing Reverse Rice that grows for years once planted Rises Robot Sophia Roles Ronaldo Routine of Nepal Banda S&P 500 S&P Global Ratings SD Scale Scaling Scikit Screen Pinning Selection Sensitivities Sensors Seven Shorts Singapore Sitting SixG Snapchat Sophia South Korea Space X SpaceX's Spam Stable Coin Starlink Steve Jobs Stock market String Success Sundar Pichai Supermarket Supervised Supervised Learning Supervised Machine Learning Supply Chain Attack Supports Swift TIFF Teaching Teenagers Telecom Telecom's Telescope TensorBoard TensorFLow Hub Thes Tiktok stop Time Travel Tool Training Data Transforming Translation Trojan Truecaller Trusting Try Type-C UAE UI US Congress USA USB Understand United States Unspoken Unsupervised Unsupervised Learning Unsupervised LearningUnsupervised Machine Learning Unsupervised Machine Learning Upcoming Upcoming Technology Urges Using a drone VPNs VR Valley Vehicles Virtual reality Virtualenv Visualize WWW Wait Walkthrough Walmart WeChat Webb Wha What are Assignment Operators in Python What are Comparison Operators in Python What are Logical Operators in Python What are Operators in Python What are the basic laws of quantum physics What is What is Chat GPT What is Google Adsense What is Pycharm What is Python What is String in Python What is Variable in Python Whose Wi-Fi 6 Wikipedia WordPress Wrangling data Write X X8 series XAI XOR XSS Yeti YouTuber Ziglar Zipty Zuckerberg access accidentally action adding admin administration advantage advertisers again against agency agricultural ai beauty aims aircraft aired alert algorithm almost alpha alternative analytics ancient and security angles announcement announces annoying answer answering answers antivirus anyone anything appear appearance appliances application approach approaching approaching science meaning apps. google arise arrived article artificial blood vessels arts associated attach attract attractions audience authentic automatic automatically autonomous avatars baby back backed bad ban bans bar basic batteries beginner benefit benefits beta bicycles bitcoin mine bitcoins black blacklisted blackout block blocking boarding bogged book bought box boycott brand brings broadband brought bug bounty build but buttons bypass cable internet cables calculus calls campaign can't cancel cancer capacity car cards careeer careful carry case cave challenge channel chat.com chats cheap cheaper checkmarks chess child chips choose. a class click clicking climbers clock closest club coding collaboration colleges color combat common communicate compensates compete competing completely computer mouse computer science computing concept condition connect cons consider consumes contains controls controversies conversations credit crime crisis criteria crore crores crowdsourcing culture cure cyberattack cyberspace cycle d about damaged danger dark data center data science dating apps deadly deal debit dedicated delete data deny deport depression destination developing devices diary die digit digital banking digital cameras digital land digital privacy disappeared disappearing discovered discovery displaced display displays disrupt disturbing document dog dollars doodle door downloads drains dream drone drug trafficking e features e-Rupee e-SIM e-books e-passport e-sewa eBooks ePassport earn money from Nepal eating economy edit editing effective electronic eligible else email server emerged emergency emojis end enough entering entire espionage etflix except excuse existence expire extracts eye face app facial facial verification failed false far farm fax fdown.net fee feet fiber fight file film final fitness five flying foldable food fooled footprint forced foreigners forensics forgotten form formats forwarding foundation free upgrade frequency freshman from search fruit fuel game tips gamer gas gasoline geometry gestures give gives goes gone good content goodbye goods google docs gossip granted great groups growing growth guide hack had hall handy happen happy harmful he head headphones headset health higher hike hikes hobby household human brain human intelligence human trafficking hundreds hurting hydrogen hype iCloud iPad iPhone 12 Pro illegal data illicit trade illnesses image processing processor images impair improvements inbox incidents incorporating increased incur instant instrument interest interesting interests internal storage internet speed intranet introduced invented invention investigating investment invites it's it’s jack join journalists journey kit laboratory lakh languages laptops last later latest launches launching lawmakers laws leak leaks legalize let letter letters light likes link links listening lives loaded lobbying locked long longest lose loss love machine vision made main features maintain major maker makes man manage management system managing mango marketplace martial mask matches matter measures measuring meetings megawatts melting meme mental messaging microphone middle million. downloads mine misleading mistake mistakes mobile number moble moment monetize monitors monkey mother mountain mounts move movie moving mute my myths name-x naming near necessary needed negative networks neural neural networking new code new look new windows news anchor next night mode non notes notifications now.gg nuclear energy obligation obscene obtained offenders office official officially offline often older open source opened operate operating system opposed optic optical fiber optimization option options others outbreak overheating oversold overtakes overuse owner page paid pandemic paper participant participate passkeys passports password. patent pattern paying payment peace pen drive permanent permission person personal personalized perspective phone confidential picture pictures pirated placed placing planting platform platforms playing policy political pop-up popular popularity port possible powered powerful practice predictive pregnant prepared pressure prices principles prize processor product key programmatically programming languages project prompt prompts property pros protected provided proxies proxy quantum computer quantum internet questions quires quota r daily radio rain rainy season raises rate reach reading realities reason rebranding recognition record recover recovery reform refresh refreshes refrigerator regarding registered registration regulators relationship remain removes removing repairing replace reports requiring reset residence resignation resolution responsibilities restaurants results returned revenue review rings risks risky road robotic dog rocket rooms round ruin rules running runs safely sale satellite scammers scary schedule scheme schools scientific screens search engines seeks selectric cars sell semi-final semiconductor sending series server services set setting sex shared sharing shield ships shocked shortage shoulders shuffled shut shuts shutting sidebar simple since sites sky sleeping slightly slow slowing smartblock smarter smartly social engineering hacking software. tech solutions somewhere soon sources space center space debris spacecraft spaceships specifications spectrum spend spending sponsors sports spying stable star starship start started starting starvation steps stocks stolen stop stories strategy streaming strong student studying subject subscribers successful suggested suggestions suitable suitcase supercomputer superintelligence surface surprised survive t are tag tagging taken talk teach team technlogy technoloy technonlogy telecommunication terminology terms test text think those thousand thread threat to threats through throwaway tightens timer tinder tired toilet took tools topic tossing touch pad tracked tracker tracking trackpad trading transact transactions transport travel trending trends trip turn turned turns tweets unbuyable unemployed unemployment unfriending unique unpleasant unregistered unsafe unseen unveils upgrades uses versatility very view viewing virtual virtual currency virtual world vishing visit visiting voter vulnerabilities warning washing waterproof weakening weapons web design websites week well went were wet what's willing withdrawn woman words works workspace world war world's worrie worried worth writer written wrong yield ‘Cloud AI’ ‘Hosts’ ‘JeffTube’ ‘Personal Intelligence’ ‘Wi-Fi Pineapple’ ‘Zoom Rides’ ‘viral’
Show more