Recursive Feature Elimination

Patient Tools

Read, save, and share this guide

Use these quick tools to make this medical article easier to read, print, save, or share with a family member.

Patient Mode

Understand this article easily

Switch between simple English and easy Bangla patient notes. This is for education and does not replace a doctor consultation.

This is the age of Artificial Intelligence and machine learning. Although we haven’t reached the point where we have sentient human-like computers (yet) so often featured in popular science fiction films and television programs, we have made significant strides in intelligent machines over the past few...

For severe symptoms, danger signs, pregnancy, child illness, or sudden worsening, seek urgent medical care.

বাংলা রোগী নোট এখনো যোগ করা হয়নি। পোস্ট এডিটরে “RX Bangla Patient Mode” বক্স থেকে সহজ বাংলা সারাংশ যোগ করুন।

এই তথ্য শিক্ষা ও সচেতনতার জন্য। এটি ডাক্তারি পরীক্ষা, রোগ নির্ণয় বা প্রেসক্রিপশনের বিকল্প নয়।

Article Summary

This is the age of Artificial Intelligence and machine learning. Although we haven’t reached the point where we have sentient human-like computers (yet) so often featured in popular science fiction films and television programs, we have made significant strides in intelligent machines over the past few decades. However, nothing happens in a vacuum. People often say that computers are smart, but computers are only as intelligent...

Key Takeaways

  • This article explains A Machine Learning Refresher in simple medical language.
  • This article explains What Is a Machine Learning Model? in simple medical language.
  • This article explains What Is Recursive Feature Elimination? in simple medical language.
  • This article explains All About RFE With scikit-learn in simple medical language.
Educational health guideWritten for patient understanding and clinical awareness.
Reviewed content workflowUse writer and reviewer profiles for stronger trust.
Emergency safety firstUrgent warning signs are highlighted below.

Seek urgent medical care if you notice

These warning signs are general safety guidance. Local emergency numbers and clinical judgment should always come first.

  • Severe symptoms, breathing difficulty, fainting, confusion, or rapidly worsening illness.
  • New weakness, severe pain, high fever, or symptoms after a serious injury.
  • Any symptom that feels urgent, unusual, or unsafe for the patient.
1

Emergency now

Use emergency care for severe, sudden, rapidly worsening, or life-threatening symptoms.

2

See a doctor

Book a professional medical evaluation if symptoms persist, worsen, recur often, affect daily activities, or occur in a high-risk patient.

3

Learn safely

Use this article to understand possible causes, tests, treatment options, prevention, and questions to ask your clinician.

Before reading

RX Patient Tools

Use these quick guides before reading the article, or return to them when you need help preparing questions for a doctor.

Start here Choose the right pathway for symptoms, reports, medicines, or urgent warning signs. Disease article roadmap Read this topic step by step: meaning, symptoms, warning signs, diagnosis, treatment, prevention, and follow-up. Treatment planner Prepare questions about treatment choices, benefits, risks, side effects, and follow-up. Family & caregiver guide Organize symptoms, reports, medicines, questions, and follow-up safely. Nutrition & diet guide Prepare food, hydration, supplement, and medicine-timing questions safely. Prevention guide Organize risk factors, protective habits, screening, and warning signs. Recovery guide Prepare a safe plan for activity, rehabilitation, warning signs, and follow-up.
Definition

This is the age of Artificial Intelligence and machine learning. Although we haven’t reached the point where we have sentient human-like computers (yet) so often featured in popular science fiction films and television programs, we have made significant strides in intelligent machines over the past few decades.

However, nothing happens in a vacuum. People often say that computers are smart, but computers are only as intelligent as they are programmed to be. It takes a lot of effort and different elements to create an intelligent machine, and we are about to explore one particularly important element.

Today, we are covering the process called Recursive Feature Elimination, or RFE for short. RFE deals with Machine Learning models and plays a vital role in improving the machine’s performance. This article hopes to demystify RFE and show its importance.

But first, we need to backtrack and go over some Machine Learning concepts to make a better case for RFE.

A Machine Learning Refresher

Industry leader IBM defines machine learning as “a branch of artificial intelligence (AI) and computer science which focuses on the use of data and algorithms to imitate the way that humans learn, gradually improving its accuracy.”

Organizations employ machine learning in cases such as online customer service chatbots, speech recognition (e.g., Alexa, Siri), computer vision (self-driving cars, social media photo tagging), and recommendation engines (making purchasing suggestions to customers based on their buying history).

There are three primary situations where machine learning comes in handy:

  • In a situation involving repeated decisions or evaluations that you want automated and receive consistent results.
  • In a situation where it’s either difficult or impossible to describe a detailed solution or criteria used to make a decision.
  • In a situation where you have existing examples or labeled data that can best describe the case, then map it to the correct result.

Machine learning is only as good as its machine learning model, which leads us to our following definition.

What Is a Machine Learning Model?

Microsoft.com defines a Machine Learning mode as “…a file that has been trained to recognize certain types of patterns.” Data scientists use data sets to train a model, giving it an algorithm to learn from the data provided.

Once you train the model, it can reason over data that it has never seen before and make predictions based on the information. For instance, if you wanted to design a facial recognition application, you could train the model by offering it a set of facial images, each one tagged with a particular emotion. You can then use the model to recognize anyone’s feelings or sentiments.

Machine Learning models consist of features, and each feature represents a piece of data that is employed in analysis. Features are input variables, a measurable property that helps achieve better pattern recognition. Using our example of facial recognition software, the salient features might include eye color, eyebrow position, ear shape, mouth shape, visible teeth, skin blemishes, forehead wrinkles, etc.

Unfortunately, in the world of Machine Learning, there’s such a thing as too much information. If the data scientist has too many features to work with, the surplus could adversely affect the model’s performance. Thus, the data scientist needs to eliminate the less relevant features. This issue leads us neatly to our next section!

What Is Recursive Feature Elimination?

Recursive Feature Elimination, or RFE Feature Selection, is a feature selection process that reduces a model’s complexity by choosing significant features and removing the weaker ones. The selection process eliminates these less relevant features one by one until it has achieved the optimum number needed to assure peak performance.

RFE ranks features by the model’s “coef” or “feature importances” attributes. It then recursively eliminates a minor number of features per loop, removing any existing dependencies and collinearities present in the model.

Recursive Feature Elimination narrows down the number of features, resulting in a corresponding increase in model efficiency.

Let’s apply this to a real-world decision-making scenario. You and your five friends are trying to decide whether to go out to eat or not. As everyone discusses the point at great length, certain factors come up for consideration, including:

  • Who is hungry enough to eat a full meal
  • How people’s available funds are holding up
  • How late people can stay up
  • What kind of food people do want
  • The location and types of local eateries
  • How late do people want to stay out
  • Who has a car

Now, consider the above items as “features” in the decision-making process. After spending way too much time debating these points, someone finally suggests that the group base their decision only on who is hungry and the locations and types of local eateries. Congratulations! You’ve recursively eliminated many features and have drastically reduced the amount of time needed to decide!

Machine learning data sets for regression or classification consist of rows and columns, resembling an Excel spreadsheet. Rows are often called “samples,” and columns are known as “features.” Feature selection in the machine learning context refers to techniques that pick a subset of the data set’s most appropriate features (e.g., columns).

Fewer features take up less space and aren’t as complex, which helps Machine Learning algorithms run more efficiently and effectively. Conversely, irrelevant input features can slow down specific machine learning algorithms and produce an inferior predictive performance.

All About RFE With scikit-learn

Data scientists can implement RFE manually, but the process can be challenging for beginners. It’s also time-consuming, although the time used for RFE should be considered an investment that pays off in the long run.

Nevertheless, the free scikit-learn RFE Python machine learning library offers an exemplary implementation of Recursive Feature Elimination, available in the later versions of the library.  Incidentally, scikit-learn is also called sklearn, so if you see the two terms, they mean the same thing.

RFE can be used to handle problems presented by the two models listed below:

  • Classification: Classification predicts the class of selected data points. Classes are also known as targets, labels, or categories. Classification predictive modeling involves approximating a mapping function (f) from input variables (X) to discrete output variables (y).
  • Regression: Regression models supply a function describing the relationship between one (or more) independent variables and a response, dependent, or target variable.

Let’s Talk About RFE Hyperparameters

Here are some hyperparameters you should consider for fine-tuning the chosen RFE method for feature selection and how they affect model performance.

  • Explore the Number of Features: One of the essential hyperparameters is the number of features to select. That’s why it’s important to test different features and see which yields the best results. Watch for where the RFE peaks concerning the number of features configured.
  • Automatically Select Number of Features: You can choose to select the feature numbers that RFE will automatically decide. You can accomplish this by performing a cross-validation evaluation of different features as shown in the previous hyperparameter and automatically choosing the number of features that produced the best mean score. Use the RFECV class to carry this out. Use the RFECV class to carry this out.
  • Which Features Were Selected? If you’re curious about which features were chosen and which were discarded, you can review the fit RFE object (or fit RFECV object) attributes. The “support_” attribute uses “true/false” to show which features were included, in order of column index. The “ranking_” attribute displays the relative features ranking in the same order.
  • Explore the Base Algorithm: The core RFE can potentially use a vast number of algorithms. Additionally, different algorithms can produce different results. Thus, you should experiment by changing the base algorithm and see the results. Choose from the decision tree, random forest, linear, or pipeline, to name a few.

Why Not Choose a Career in Machine Learning?

Artificial Intelligence and Machine Learning are fast-growing fields in today’s digital world. So, if you’re curious about a new career (or making a change from an old one!) and you want something exciting, challenging, and with great rewards and job security, consider Machine Learning.

Simplilearn offers a Caltech Post Graduate Program in AI and Machine Learning which will help you hone the right skills and make you job-ready.

Glassdoor reports that Machine Learning Engineers in the United States earn a yearly average of USD 131,001. Payscale.com shows that Machine Learning Engineers in India make an annual average of ₹ 732,099.

The Future of Jobs Report 2020 reported that the artificial intelligence field will create 12 million new jobs across 26 countries by 2025. However, this figure represents a net gain, since the report predicts that 85 million jobs will be displaced while 97 new AI/ML-related jobs will be created.

This outlook is your opportunity to not only explore new career options but also protect yourself from possible AI-related job displacement. Let Simplilearn help prepare you for the brave new world of Artificial Intelligence and Machine Learning. Check out our courses today!

Doctor visit helper

Prepare before seeing a doctor

A simple rural-patient checklist to help you explain symptoms clearly, ask better questions, and avoid unsafe self-treatment.

Safety note: This is not a prescription or diagnosis. For severe symptoms, pregnancy danger signs, children with serious illness, chest pain, breathing difficulty, stroke-like weakness, or major injury, seek urgent care.

Which doctor may help?

Start with a registered doctor or the nearest qualified health center.

What to tell the doctor

  • Write when the problem started and how it changed.
  • Bring old prescriptions, investigation reports, and current medicines.
  • Write allergies, pregnancy status, diabetes, kidney/liver disease, and major past illnesses.
  • Bring one family member if the patient is weak, elderly, confused, or a child.

Questions to ask

  • What is the most likely cause of my symptoms?
  • Which danger signs mean I should go to hospital quickly?
  • Which tests are necessary now, and which can wait?
  • How should I take medicines safely and what side effects should I watch for?
  • When should I come for follow-up?

Tests to discuss

  • Vital signs: temperature, pulse, blood pressure, oxygen saturation
  • Basic physical examination by a clinician
  • CBC, urine test, blood sugar, or imaging only when clinically needed

Avoid these mistakes

  • Do not use antibiotics, steroid tablets/injections, or strong painkillers without proper medical advice.
  • Do not hide pregnancy, kidney disease, ulcer, allergy, or blood thinner use.
  • Do not delay emergency care when danger signs are present.

Medicine safety and first-aid guide

This section is for patient education only. It does not replace a doctor, pharmacist, or emergency care.

Safe first steps

  • Avoid heavy lifting, sudden bending, and prolonged bed rest.
  • Use comfortable posture and gentle movement as tolerated.
  • Discuss physiotherapy, X-ray, or MRI only when clinically needed.

OTC medicine safety

  • For mild back pain, pain-relief medicine may be discussed with a doctor or pharmacist.
  • Avoid repeated painkiller use if you have kidney disease, stomach ulcer, uncontrolled blood pressure, or are taking blood thinners.

Avoid these mistakes

  • Do not start antibiotics without a proper medical decision.
  • Do not use steroid tablets or injections casually for quick relief.
  • Do not delay emergency care because of home remedies.

Get urgent help if

  • Back pain with leg weakness, numbness around private area, loss of urine/stool control, fever, cancer history, or major injury needs urgent care.
Medicine names, dose, and timing must be decided by a qualified clinician or pharmacist after checking age, pregnancy, allergy, other diseases, and current medicines.

For rural patients and family caregivers

Patient health record and symptom diary

Write your symptoms, medicines already taken, test results, and questions before visiting a doctor. This note stays on your device unless you print or copy it.

Doctor to discuss: Doctor / qualified healthcare provider
Tests to discuss with doctor
  • Basic vital signs: temperature, pulse, blood pressure, oxygen level if needed
  • Relevant blood, urine, imaging, or specialist tests only after clinical assessment
Questions to ask
  • What is the most likely cause of my symptoms?
  • Which warning signs mean I should go to emergency care?
  • Which tests are really needed now?
  • Which medicines are safe for my age, pregnancy status, allergy, kidney/liver/stomach condition, and current medicines?

Emergency warning signs such as chest pain, severe breathing difficulty, sudden weakness, confusion, severe dehydration, major injury, or loss of bladder/bowel control need urgent medical care. Do not wait for online information.

Safe pathway to proper treatment

Care roadmap for: Recursive Feature Elimination

Use this simple roadmap to understand the next safe steps. It is educational and does not replace examination by a doctor.

Go to emergency care if you notice:
  • Severe or rapidly worsening symptoms
  • Breathing difficulty, chest pain, fainting, confusion, severe weakness, major injury, or severe dehydration
Doctor / service to discuss: Qualified healthcare provider; specialist depends on symptoms and examination.
  1. Step 1

    Check danger signs first

    If danger signs are present, seek emergency care and do not wait for online information.

  2. Step 2

    Record the symptom story

    Write when symptoms started, severity, medicines already taken, allergies, pregnancy status, and test results.

  3. Step 3

    Visit a qualified clinician

    A doctor, nurse, or qualified healthcare provider can examine you and decide which tests or treatment are needed.

  4. Step 4

    Do only useful tests

    Do tests after clinical assessment. Avoid unnecessary tests, random antibiotics, or repeated medicines without diagnosis.

  5. Step 5

    Follow up and return early if worse

    If symptoms worsen, new warning signs appear, or treatment is not helping, return for review quickly.

Rural patient practical tips
  • Take a written symptom diary and all previous prescriptions/test reports.
  • Do not hide medicines already taken, even herbal or over-the-counter medicines.
  • Ask which warning signs mean urgent referral to hospital.

This roadmap is for education. A real diagnosis and treatment plan requires history, examination, and clinical judgment.

RX Patient Help

Ask a health question safely

Write your symptom story. A health professional or site editor can review it before any answer is prepared. This box is not for emergency care.

Emergency first: Severe chest pain, breathing trouble, unconsciousness, stroke signs, severe injury, heavy bleeding, or rapidly worsening symptoms need urgent local medical care now.

Frequently Asked Questions

A Machine Learning Refresher Industry leader IBM defines machine learning as “a branch of artificial intelligence (AI) and computer science which focuses on the use of data and algorithms to imitate the way that humans learn, gradually improving its accuracy.” Organizations employ machine learning in cases such as online customer service chatbots, speech recognition (e.g., Alexa, Siri), computer vision (self-driving cars, social media photo tagging), and recommendation engines (making purchasing suggestions to customers based on their buying history). There are three primary situations where machine learning comes in handy: In a situation involving repeated decisions or evaluations that you want automated and receive consistent results. In a situation where it’s either difficult or impossible to describe a detailed solution or criteria used to make a decision. In a situation where you have existing examples or labeled data that can best describe the case, then map it to the correct result. Machine learning is only as good as its machine learning model, which leads us to our following definition. What Is a Machine Learning Model?

Microsoft.com defines a Machine Learning mode as “…a file that has been trained to recognize certain types of patterns.” Data scientists use data sets to train a model, giving it an algorithm to learn from the data provided. Once you train the model, it can reason over data that it has never seen before and make predictions based on the information. For instance, if you wanted to design a facial recognition application, you could train the model by offering it a set…

What Is Recursive Feature Elimination?

Recursive Feature Elimination, or RFE Feature Selection, is a feature selection process that reduces a model’s complexity by choosing significant features and removing the weaker ones. The selection process eliminates these less relevant features one by one until it has achieved the optimum number needed to assure peak performance. RFE ranks features by the model’s “coef” or “feature importances” attributes. It then recursively eliminates a minor number of features per loop, removing any existing dependencies and collinearities present in the…

All About RFE With scikit-learn Data scientists can implement RFE manually, but the process can be challenging for beginners. It’s also time-consuming, although the time used for RFE should be considered an investment that pays off in the long run. Nevertheless, the free scikit-learn RFE Python machine learning library offers an exemplary implementation of Recursive Feature Elimination, available in the later versions of the library.  Incidentally, scikit-learn is also called sklearn, so if you see the two terms, they mean the same thing. RFE can be used to handle problems presented by the two models listed below: Classification: Classification predicts the class of selected data points. Classes are also known as targets, labels, or categories. Classification predictive modeling involves approximating a mapping function (f) from input variables (X) to discrete output variables (y). Regression: Regression models supply a function describing the relationship between one (or more) independent variables and a response, dependent, or target variable. Let’s Talk About RFE Hyperparameters Here are some hyperparameters you should consider for fine-tuning the chosen RFE method for feature selection and how they affect model performance. Explore the Number of Features: One of the essential hyperparameters is the number of features to select. That's why it's important to test different features and see which yields the best results. Watch for where the RFE peaks concerning the number of features configured. Automatically Select Number of Features: You can choose to select the feature numbers that RFE will automatically decide. You can accomplish this by performing a cross-validation evaluation of different features as shown in the previous hyperparameter and automatically choosing the number of features that produced the best mean score. Use the RFECV class to carry this out. Use the RFECV class to carry this out. Which Features Were Selected? If you’re curious about which features were chosen and which were discarded, you can review the fit RFE object (or fit RFECV object) attributes. The “support_” attribute uses “true/false” to show which features were included, in order of column index. The “ranking_” attribute displays the relative features ranking in the same order. Explore the Base Algorithm: The core RFE can potentially use a vast number of algorithms. Additionally, different algorithms can produce different results. Thus, you should experiment by changing the base algorithm and see the results. Choose from the decision tree, random forest, linear, or pipeline, to name a few. Why Not Choose a Career in Machine Learning?

Artificial Intelligence and Machine Learning are fast-growing fields in today’s digital world. So, if you’re curious about a new career (or making a change from an old one!) and you want something exciting, challenging, and with great rewards and job security, consider Machine Learning. Simplilearn offers a Caltech Post Graduate Program in AI and Machine Learning which will help you hone the right skills and make you job-ready. Glassdoor reports that Machine Learning Engineers in the United States earn a yearly average of…

References

Add references, clinical guidelines, textbooks, journal articles, or trusted medical sources here. You can edit this area from the RX Article Professional Blocks panel.