Professional Documents
Culture Documents
Ethics
Ethics
AIM
To experiment the regression model with model with bias while approximating real life problems using UCI repository.
ALGORITHM
Step3: Generate random data for the feature ‘X’ and the target variable ‘y’ with a linear relationship and some noise.
Step6: Display the plot showing the data points and the fitted linear regression line.
PROGRAM
import numpy as np
np.random.seed(42)
X = 2 * np.random.rand(100, 1)
y = 4 + 3 * X + np.random.randn(100, 1)
print("Slope:", theta_with_bias[1][0])
plt.scatter(X, y)
plt.xlabel("X")
plt.ylabel("y")
plt.show()
OUTPUT
Slope: 2.7701133864384806
6.Experiment the regression model without bias while approximating real life problems using UCI repository
AIM
To experiment the regression model with model without bias while approximating real life problems using UCI
repository.
ALGORITHM
Step6: Create the scatter plot for the linear regression without bias
PROGRAM
import numpy as np
np.random.seed(42)
X = 2 * np.random.rand(100, 1)
y = 4 + 3 * X + np.random.randn(100, 1)
print("Slope:", theta_without_bias[0][0])
plt.scatter(X, y)
plt.xlabel("X")
plt.ylabel("y")
plt.show()
OUTPUT
Slope: 5.980275533687616
AIM
ALGORITHM
Step3: Generate random data for the feature ‘X’ and the target variable ‘y’ with a linear relationship.
Step6: Create a Linear Regression model and fit it using the generated data.
PROGRAM
import numpy as np
np.random.seed(42)
X = 2 * np.random.rand(100, 1)
y = 4 + 3 * X + 1.5 * np.random.randn(100, 1)
plt.scatter(X, y)
plt.xlabel('X')
plt.ylabel('Y')
plt.show()
model = LinearRegression().fit(X, y)
plt.scatter(X, y)
plt.xlabel('X')
plt.ylabel('Y')
plt.show()
OUTPUT
15. Experiment the ethical challenges while implementing a mobile robot using AI
AIM
To experiment the ethical challenges while implementing a mobile robot using AI.
ETHICAL CONSIDERATION
Ethical Considerations:
1. Privacy Concerns:
• Drones equipped with cameras can invade privacy. Ensure proper consent, adhere to privacy laws,
and implement features like geofencing to prevent drones from entering private spaces.
2. Safety Measures:
• Implement safety features to prevent collisions and injuries. Use obstacle detection systems and
follow airspace regulations to avoid accidents.
3. Data Security:
• Protect data collected by drones. Encrypt communication channels and storage to prevent
unauthorized access to sensitive information.
ALGORITHM
Step3: Define a method to take off and check the status if the drone is already flying.
Step5: Define a function’move to’ to simulate the drone to move to a particular location
PROGRAM
class AutonomousDrone:
def __init__(self):
self.is_flying = False
def take_off(self):
if not self.is_flying:
self.is_flying = True
else:
def land(self):
if self.is_flying:
print("Drone landing.")
self.is_flying = False
else:
if self.is_flying:
self.location = (x, y, z)
else:
drone.take_off()
drone.move_to(10, 5, 2)
drone.land()
OUTPUT
Drone landing.
17. Experiment the Identification of ethical issues while building a Humanoid robot
AIM
ETHICAL CONSIDERATION:
1. Security Measures:
• Safeguard the humanoid robot against hacking or unauthorized access. Ensure robust cybersecurity
measures to protect user data and prevent misuse.
2. Task Appropriateness:
• Define ethical guidelines for the types of tasks the humanoid robot can perform. Avoid tasks that may
violate ethical standards or pose risks to users.
3. Informed Consent:
• Obtain informed consent from users before collecting personal data or performing tasks. Clearly
communicate the capabilities and limitations of the humanoid robot.
ALGORITHM
Step4: Define a method ‘power_off’ which simulates the robot to off state.
Step5: Define a function ‘perform_task that simulates the humanoid robot to perform certain tasks.
PROGRAM
import time
class HumanoidRobot:
def __init__(self):
self.power_level = 100
self.is_active = False
def power_on(self):
if not self.is_active:
self.is_active = True
else:
def power_off(self):
if self.is_active:
self.is_active = False
else:
if self.is_active:
self.power_level -= 10
else:
# Example Usage
robot = HumanoidRobot()
robot.power_on()
robot.power_off()
OUTPUT
1. Experiment the major medical ethical challenges facing the public and healthcare providers in India
AIM
To experiment the major medical ethical challenges facing the public and healthcare providers in India.
ETHICAL CONSIDERATION
1.Access to Healthcare:
• Challenge: There is a significant disparity in healthcare access between urban and rural areas. Rural
populations often face challenges in accessing quality healthcare services due to inadequate
infrastructure and a shortage of healthcare professionals.
2. Informed Consent:
• Challenge: Obtaining informed consent from patients, especially in rural areas and among those with
low health literacy, can be challenging. Patients may not fully understand the implications of medical
procedures or treatments.
3. Doctor-Patient Relationship:
• Challenge: Building and maintaining a trusting doctor-patient relationship can be challenging,
especially in a system where doctors are sometimes overburdened with large patient loads. Effective
communication and empathy may be compromised.
ALGORITHM
Step3: Define a method named ‘request_treatment’ that simulates a patient requesting a specific treatment.
PROGRAM
class HealthcareSystem:
self.resources = resources
if self.resources >= 1:
print("Treatment approved.")
self.resources -= 1
else:
# Example Usage
healthcare_system = HealthcareSystem(resources=5)
OUTPUT
Treatment approved.
AIM
ETHICAL CONSIDERATION
Step3: Define methods power_on and power_off to simulate the robot's activation and deactivation.
Step4: Define methods enable_safety_mode and disable_safety_mode to simulate the activation and deactivation of
safety mode.
PROGRAM
class Robot:
self.name = name
self.is_active = False
self.safety_mode = False
def power_on(self):
self.is_active = True
def power_off(self):
self.is_active = False
def enable_safety_mode(self):
self.safety_mode = True
def disable_safety_mode(self):
self.safety_mode = False
robot = Robot(name="RoboBot")
robot.power_on()
robot.enable_safety_mode()
robot.disable_safety_mode()
robot.power_off()
OUTPUT