1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Helen [10]
4 years ago
6

Use deep neural networks (you may use any free deep learning software tool) to perform a binary classification task, show final

classification accuracies by using 10-fold cross-validation for different cases such as different training epochs. Please show your steps clearly.You may use MS-Word to open this file. The first 13 columns are inputs, and the final column is class (either Healthy (0) or Sick (1, 2, 3, 4)). So you need to pre-process the data to make a training file for binary heart disease classification (the final column value will be either Healthy (+1) or Sick (-1), i.e., 1, 2, 3 and 4 are converted into Sick (-1)).Use SVM to perform the same heart disease classification task and show final classification accuracies by using 10-fold cross-validation for different cases such as different parameters of SVM. Please compare SVM and deep neural networks in classification performance.
Engineering
1 answer:
Pani-rosa [81]4 years ago
6 0

The following SVM is used to perform the same heart disease classification task and the final classficiation accuracies.

<u>Explanation:</u>

import numpy as np

import pandas as pd

import seaborn as sns

import matplotlib.pyplot as plt

%matplotlib inline

dataset = pd.read_csv('heart_disease. csv')

dataset.head(2)

# creating target variables

from sklearn.preprocessing import LabelEncoder

le = LabelEncoder()

y=le.fit_transform(dataset['Car Acceptability'])

#standardizing the input feature

from sklearn.preprocessing import StandardScaler

sc= StandardScaler()

X= sc.fit_transform(all_input_columns)

from sklearn.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(X, output_category, test_size=0.3)  

# K fold validation

def build_classifier():

classifier = Sequential()

#First Hidden Layer

classifier.add(Dense(8, activation='relu', kernel_initializer='random_uniform', input_dim=13))

  #Second Hidden Layer

classifier.add(Dense(8, activation='relu', kernel_initializer='random_uniform'))

#Output Layer

classifier.add(Dense(4, activation='softmax', kernel_initializer='random_uniform'))

#Compiling the neural network

classifier.compile(optimizer ='adam',loss='categorical_crossentropy', metrics =['accuracy'])

return classifier

We pass build_classifier function to the build_fn argument while constructing the KerasClassifier class. Batch_size is 10 and we run 150 epochs

classifier = KerasClassifier(build_fn=build_classifier, batch_size=10, nb_epoch=150)

As we have used the KerasClassifier to warp the model, we can use scikit-learn. Once we do that then we can use neural network like any other scikit algorithms like Random forest and perform 10 fold cross-validation.

accuracies = cross_val_score(estimator=classifier, X= X, y=output_category,cv=10, n_jobs=-1)

note: do with each fold by replacing 10 with other

You might be interested in
A system is linear if it has​
Nadusha1986 [10]

A system is a linear system if all equations inside the system can be simplified into the form,

y=mx+n

aka linear form of a linear equation.

So to sum up, a system is linear if all equations are linear equations.

Hope this helps :)

6 0
3 years ago
Looking at what others in the engineering field have done to solve problems is called?
natulia [17]

Answer:

Swiping

Explanation:

One of the methodologies we use to solve problems

4 0
3 years ago
Explain the function of database administrator.<br><br>don't spam..​
Ghella [55]

The database administrator performs the following tasks:

  • It is used for the storage and the organization of data.
  • It is used for database design
  • It is used to install and configure
  • It is used to used to backup and also to recover data.

<h3>What is database administration?</h3>

This is used to describe the many activities that the database is used to perform activities in order to ensure that the system software are well managed.

Read more on database administrator here:

brainly.com/question/24223730

7 0
3 years ago
An airplane flies from San Francisco to Washington DC at an air speed of 800 km/hr. Assume Washington is due east of San Francis
alexira [117]

Answer:

A.) 7.13 degree north east

B.) 806.23 km/h

C.) 7.44 hours

D.) 0.06 hours

Explanation:

Assume Washington is due east of San Francisco and Francisco with Washington in the positive x-direction

Also, the cross wind is blowing from north to south of 100 km/hr in y coordinate direction.

A.) Using Cartesian system of coordinates, the direction of flight for the plane to actually arrive in Washington can be calculated by using the formula

Tan Ø = y/x

Substitute y = 100 km/h and x = 800km/h

Tan Ø = 100/800

Tan Ø = 0.125

Ø = Tan^-1(0. 125)

Ø = 7.13 degrees north east.

Therefore, the direction of flight for the plane to actually arrive in Washington is 7.13 degree north east

B.) The speed in the San Francisco to Washington direction can be achieved by using pythagorean theorem

Speed = sqrt ( 800^2 + 100^2)

Speed = sqrt (650000)

Speed = 806.23 km/h

C.) Let us use the speed formula

Speed = distance / time

Substitute the speed and distance into the formula

806.23 = 6000/ time

Make Time the subject of formula

Time = 6000/806.23

Time = 7.44 hours

D.) If there is no cross wind,

Time = 6000/800

Time = 7.5 hour

Time difference = 7.5 - 7.44

Time difference = 0.06 hours

4 0
3 years ago
identify the precautions to take with exits in the lab. select one or more: make sure lab windows are always open. keep the exit
Svetlanka [38]

Exit signs are made to be easily recognizable and understandable by everyone.

<h3>What is meant by an EXIT sign?</h3>

In a public space (such as a building, airplane, or boat), an exit sign is a symbol or brief text that indicates the location of the closest emergency exit to use in the event of a fire or another emergency requiring a quick evacuation. The majority of pertinent codes (fire, building, health, or safety) demand that exit signs be always lit.

Exit signs are made to be easily recognizable and understandable by everyone. This typically meant exit signs that displayed the word "EXIT" or its translation in the local language in the past, but exit signs around the world are increasingly being displayed as pictograms, either with or without accompanying text.

Therefore, the correct answer is option

c) Do not block a door with an EXIT sign.

d) Locate the exits prior to the start of the lab.

The complete question is:

identify the precautions to take with exits in the lab. select one or more: a) make sure lab windows are always open.

b) keep the exit door locked at all times.

c) Do not block a door with an EXIT sign.

d) Locate the exits prior to the start of the lab.

To learn more about EXIT sign refer to:

brainly.com/question/28404171

#SPJ4

5 0
2 years ago
Other questions:
  • Please help!!
    7·2 answers
  • 3. An isolated system has an initial temperature of 30oC. It is then placed on top of a Bunsen burner whose temperature is 70oC
    10·1 answer
  • A pin-supported structure has unrestrained rotations at the support locations.a) True b) False
    10·1 answer
  • It is said that Archimedes discovered his principle during a bath while thinking about how he could determine if KingHiero‘s cro
    15·1 answer
  • The in situ moisture content of a soil is 18% and the moist (total) unit weight is 105 pcf. The soil is to be excavated and tran
    9·1 answer
  • Several different loads are going to be used with the voltage divider from Part A. If the load resistances are 300 kΩkΩ , 200 kΩ
    7·1 answer
  • Saturated water at 25C enters a tank through a 10-cm diameter pipe at a velocity of 3 m/s. At the bottom of the tank, water exi
    5·1 answer
  • Which two factors does the power of a machine depend on? A. work and distance B. force and distance C. work and time D. time and
    12·1 answer
  • Hi, everyone I'm a high school student in Texas. My engineering teacher is asking us to find an active engineer to complete a li
    5·1 answer
  • Using data in Appendix A ,calculate the number of atoms in 1 tonne of iron
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!