I. CLASSIFICATION EVALUATION METRICS
A. Confusion Matrix (for two classes: Positive (+), Negative (-))
Predicted + Predicted -
Actual + TP (f++) FN (f+-)
Actual - FP (f-+) TN (f--)
True Positive (TP): Actual +, Predicted +. Correctly identified positives.
False Negative (FN): Actual +, Predicted -. Missed positives (Type II error).
False Positive (FP): Actual -, Predicted +. Falsely identified positives (Type I error).
True Negative (TN): Actual -, Predicted -. Correctly identified negatives.
Total Actual...
1) import matplotlib.pyplot as plt||import pandas as pd||import seaborn as sns||from sklearn.datasets import fetch_california_housing||# Load the California Housing dataset||california = fetch_california_housing(as_frame=True)||df = california.frame||# Numerical features||numerical_features = df.select_dtypes(include=['number']).columns||# Histograms||plt.figure(figsize=(15, 10))||for i, feature in enumerate(numerical_features):||plt.subplot(3, 3, i + 1)||sns.histplot(df[feature], kde=True)||plt.
const { createStore } = require('redux'); // Or 'import { createStore } from 'redux';'
// 1. Initial State
const initialState = { tasks: [] };
// 2. Action Types & Creators
const ADD_TASK = 'ADD_TASK';
const REMOVE_TASK = 'REMOVE_TASK';
function addTask(task) { // task: { id, description }
return { type: ADD_TASK, payload: task };
}
function removeTask(taskId) { // taskId: number
return { type: REMOVE_TASK, payload: taskId };
}
// 3. Reducer
function taskReducer(state = initialState, action) {
...
1. Introduction: Lord Ripon, the Viceroy of India from 1880 to 1884, is known as the "Father of Local Self-Government" in India.
He believed in giving Indians a role in administration and improving governance through local bodies.
2. Main Objectives:To promote democratic participation at the local level.
To make administration more efficient and responsive to local needs.To train Indians in the art of self-governance.
3. Key Features of the 1882 Resolution: Establishment of Local Boards: District...
1. useState
Purpose: Adds state to functional components.
Import: import { useState } from 'react';
Syntax: const [state, setState] = useState(initialValue);
Update: setState(newValue); or setState(prevState => ...); (for updates based on previous state).
Example:
import React, { useState } from 'react';
function Counter() {
const [count, setCount] = useState(0);
return (
<div>
<p>Count: {count}</p>
<button onClick={() => setCount(count + 1)}>Increment</button>
</div>...
Why Does Lower-Quality Land Lead to Lower Profit? (Ricardo)
1. Best land = used first (high productivity); lower-quality land = used later (low productivity).
2. More land = ↓ yield per unit of labor/capital; output costs ↑ as worse land is used.
3. Best land now has surplus over worst land; surplus = rent to landowners.
4. Lower productivity → food prices ↑; workers need ↑ wages to survive.
5. Higher wages = ↓ capitalist profits; profits squeezed as rent ↑ + wages ↑.
6. Capital
...Portfolio investments: have interest, dividends, or capital gains à tax interest when you receive it at ordinary rates. Dividends are taxed and so are corresponding capital gains. Qualified dividends: investors hold stock for more than 60 days during the 121 day pd that begins 60 days before the ex-dividend date, the first date on which the purchasers of the stock would not be eligible to receive a declared dividend. These are taxed at 0/15/20%. Nonqualified dividends are taxed at ordinary rates....
Quantity Identity of Money: M x V = P x Y (M = money, V = velocity, P = price level, Y = real GDP, P x Y = nominal GDP)
To calculate inflation, multiply new prices by # of old goods (total)
m + v = pi + y: growth rates of quantity identity of money, assuming v = 0 in long run, pi = m - y (inflation = money supply growth - real GDP growth)
Inflation makes it easier for central banks to respond to shocks w/ lower real interest rates since r = i - pi (this is why you can overcome zero lower bound by...
Os Argumentos Cosmológicos procuram provar a existência de Deus a partir de dados, de factos empíricos, o que se capta através dos sentidos.
Quando observamos os seres sensíveis (tudo o que existe no universo, quer sejam seres vivos ou inanimados) perguntamo-nos qual será a sua origem e percebemos que hão de ter certas causas, causas designadas como eficientes (causas que provocam