0% found this document useful (0 votes)
37 views26 pages

Python and Orange Data Mining Programs

The document outlines various Python programs using libraries such as NumPy and Pandas, covering tasks like creating arrays, calculating statistics, and manipulating data frames. It also details programs using the Orange Data Mining Tool for dataset analysis, visualization, and predictions. Additionally, a bibliography is included with references to relevant textbooks and official documentation.

Uploaded by

ayush05x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views26 pages

Python and Orange Data Mining Programs

The document outlines various Python programs using libraries such as NumPy and Pandas, covering tasks like creating arrays, calculating statistics, and manipulating data frames. It also details programs using the Orange Data Mining Tool for dataset analysis, visualization, and predictions. Additionally, a bibliography is included with references to relevant textbooks and official documentation.

Uploaded by

ayush05x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PYTHON PROGRAMS USING LIBRARIES:-

PROGRAM 1:- Create a NumPy array of 10 integers and


Display their mean, median and standard deviation.
CODE:-

OUTPUT OF THE PROGRAM:-

PROGRAM 2:- Creation of a DataFrame.


CODE:-

OUTPUT OF THE PROGRAM:-


PROGRAM 3:- Create a 3x3 matrix and find its transpose
and inverse.
CODE:-

OUTPUT OF THE PROGRAM:-


PROGRAM 4:- Display students who scored more than 80
in Math.
CODE:-

OUTPUT OF THE PROGRAM:-

PROGRAM 5:- Write a Python program using NumPy to


store 5 numbers in an array and print their sum.
CODE:-

OUTPUT OF THE PROGRAM:-


PROGRAM 6:- Create two NumPy array and perform
addition, subtraction and multiplication.
CODE:-

OUTPUT OF THE PROGRAM:-

PROGRAM 7:- Create a NumPy array containing all even


numbers between 10 and 30.
CODE:-

OUTPUT OF THE PROGRAM:-


PROGRAM 8:- Write a Python program to sort employee
salaries in ascending order.
CODE:-

OUTPUT OF THE PROGRAM:-


PROGRAM 9:- Create a DataFrame of 5 cities with their
population. Display the city with the lowest population.
CODE:-

OUTPUT OF THE PROGRAM:-

PROGRAM 10:- Generate an array of 20 random integers


Between 1 to 100 and find even numbers.
CODE:-

OUTPUT OF THE PROGRAM:-


PROGRAM 11:- Create a Pandas Series from a Python list.
CODE:-

OUTPUT OF THE PROGRAM:-

PROGRAM 12:- Generate a NumPy array of 15 random


integers between 1 and 50. Extract and display only those
elements that are divisible by 5.
CODE:-

OUTPUT OF THE PROGRAM:-


PROGRAM 13:- Find the square of each element in an
array using NumPy.
CODE:-

OUTPUT OF THE PROGRAM:-

PROGRAM 14:- Find the maximum, minimum and


average of a NumPy array.
CODE:-

OUTPUT OF THE PROGRAM:-


PROGRAM 15:-
Write a Python program using Pandas to create a DataFrame of
students’ names and their English marks. Display the DataFrame
and also calculate the total marks in English obtained by all
students.
CODE:-

OUTPUT OF THE PROGRAM:-


ORANGE DATE MINING TOOLS PROGRAMS: -
PROGRAM 1:- Check dataset statistics.
AIM:- To perform dataset information using Orange Data Mining
Tool.
Widgets Used:- File, Data Table, Data Info

Procedure:-
1. Drag File widget and select Iris dataset
2. Drag Data Table and Data Info widget
3. Connect File → Data Table → Data Info
OUTPUT:-

CONCLUSION:- Successfully executed dataset information in


Orange.
PROGRAM 2:- Viewing Dataset.
AIM:- To load and view Iris dataset using Orange.
Widgets Used:- File, Data Table
Procedure:-
1. Drag File widget and select Iris dataset
2. Drag Data Table widget
3. Connect File → Data Table
OUTPUT:-

CONCLUSION:- Successfully viewed dataset in tabular form.


PROGRAM 3:- Check attribute distribution.
AIM:- To perform attribute distribution using Orange Data Mining
Tool.
Widgets Used:- File, Distributions

Procedure:-
1. Drag File widget and select Iris dataset
2. Drag distributions widget
3. Connect File → Distributions
OUTPUT:-

CONCLUSION:- Successfully executed attribute distribution in


Orange.
PROGRAM 4:- Scatter Plot Visualization
AIM:- To perform scatter plot visualization using Orange Data
Mining Tool.
Widgets Used:- File, Scatter Plot

Procedure:-
1. Drag File widget and select Iris dataset
2. Drag scatters plot widget
3. Connect File → Scatter Plot
OUTPUT:-

CONCLUSION:- Successfully executed scatter plot visualization


in Orange.
PROGRAM 5:- Box Plot Analysis
AIM:- To perform box plot analysis using Orange Data Mining
Tool.
Widgets Used:- File, Box Plot

Procedure:-
1. Drag File widget and select Iris dataset
2. Drag box plot widget
3. Connect File → Box Plot
4. View data info
OUTPUT:-

CONCLUSION:- Successfully executed box plot analysis in


Orange.
PROGRAM 6:- Select Columns Feature
AIM:- To perform select columns feature using Orange Data
Mining Tool.
Widgets Used:- File, Select Columns, Data Table
Procedure:-

1. Drag File widget and select Iris dataset


2. Drag select columns and data table widget
3. Connect File → Select Columns → Data Table
OUTPUT:-

CONCLUSION:- Successfully executed select columns feature


in Orange.
PROGRAM 7:- Normalize Data
AIM:- To perform Normalize Data model using Orange Data
Mining Tool.
Widgets Used:- File, data table, preprocess
Procedure:-

1. Connect the Preprocess widget to the File or Data Table widget.


2. Double-click on the Preprocess widget and select "Normalize
Features".
3. Choose an interval, such as 0–1 or -1–1.
4. Connect File → Preprocess, Connect File → Data Table
OUTPUT:-

CONCLUSION:- Successfully executed Normalize Data model in


Orange.
PROGRAM 8:- Clean Data
AIM:- To perform clean data model using Orange Data Mining
Tool.
Widgets Used:- File, data table, Impute
Procedure:-
1. Use the File widget to upload a dataset with missing values.
2. Assign the role of "Target" to the feature you want to predict.
1. Connect the Impute widget to the File widget.
2. Double-click the Impute widget and select an imputation
strategy: Average (mean), most frequent (mode), fixed value,
Random value

4. Connect File → Impute


Connect File → Data Table
OUTPUT:

CONCLUSION:- Successfully executed Clean Data model in


Orange.
PROGRAM 9:- Analyze Data
AIM:- To perform analyze data model using Orange Data Mining
Tool.
Widgets Used:- File, Impute, Preprocess, Logistic Regression
Procedure:-

1. Drag and drop the Logistic Regression widget.


2. Connect it to the cleaned and normalized data.
4. Connect File → Impute → Preprocess → Logistic Regression
OUTPUT:-

CONCLUSION:- Successfully Analyze Data model in Orange.


PROGRAM 10:- Generate Predictions
AIM:- To perform Predictions model using Orange Data Mining
Tool.
Widgets Used:- File, Impute, Preprocess, Logistic Regression,
Test and Score, Predictions
Procedure:-

1. Drag and drop the Logistic Regression widget.


2. Connect it to the cleaned and normalized data.
4. Connect File → Impute → Preprocess → Logistic Regression →
Test and Score → Predictions
OUTPUT:-

CONCLUSION:- Successfully Generate Predictions model in


Orange.
Bibliography
 NCERT Informatics Practices Class 12
Textbook

 Python Official Documentation –


[Link]

 NumPy Official Documentation –


[Link]

 Pandas Official Documentation –


[Link]

 Notes provided by our Informatics Practices


Teacher

 Practical experience through various Python


IDEs like IDLE

You might also like