This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "R Notebook" | |
output: html_notebook | |
--- | |
# Chapter 10 Canonical correlation Analysis (CH10 p 539) | |
Chapter is related to Partitioning the covariance matrix (p73 ch2) .(ABbrevation :kısaltma ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Multivariate Statisttics 7.Week Lecture Notes | |
# Multivariate Multiple Regression Analysis | |
You can find this topic in the chapter 8 in the book. | |
1. Multiple Regression | |
$$ Y = X\beta +\varepsilon ~~\to \text{Regression Model} $$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#y=ax+b^ | |
#y<-matrix(c(12,10,8,11,6,7,2,3,3),nrow=9,ncol=1) | |
#y | |
#x<-matrix(0:8,nrow=9,ncol=1) | |
#x | |
#b<-solve(t(x)%*%x)%*%t(x)%*%y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#varyans kovaryans matrisi tanımlayalım | |
Sigma<-matrix(c(19,30,2,12,30,57,5,23,2,5,38,47,12,23,43,68),ncol = 4,byrow = True) | |
#loading matrix | |
lodMatrix<-matrix(c(4,1,7,2,-1,6,1,8),ncol = 2,byrow = TRUE) | |
#loading matrisinin transpozu | |
TransLodMatrix<-t(lodMatrix) | |
#matrislerin çarpımı | |
multiple<-lodMatrix %*% TransLodMatrix | |
#sigma ile ll' çarpımını çıkarıyoruz | |
Result=Sigma-multiple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
companies1 <- c("BİST100","USD","ALTIN","ISDMR1","ISDMR") | |
cash1<-c(17626,28650,38122,75699,62652) | |
cash1<-cash1[order(cash1)] | |
df1<-data.frame(companies1) | |
barplot(cash1, names.arg= companies1, | |
main = "Şirket değerleri",col=rainbow(3) | |
,xlab = "Şirket isimleri", ylab = "değeri") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(reshape2) | |
library(ggplot2) | |
#yapılacak işler/görevler | |
tasks <- c("Literatür taraması", "Veri toplanması", "Veri Analizi", "Rapor ve veri görselleştirmesi") | |
#görevlerimizi bir dataframe'a aktarıyoruz | |
dfr <- data.frame( | |
name = factor(tasks, levels = tasks), | |
start.date = as.Date(c("2010-08-24", "2010-10-31", "2010-11-01", "2011-02-14")), | |
end.date = as.Date(c("2010-10-31", "2010-12-14", "2011-02-28", "2011-04-30")), | |
is.critical = c(TRUE, FALSE, FALSE, TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Friends { | |
private String Name; | |
private Friends next; | |
} | |
public class Person extends Friends { | |
private String Name; | |
private Integer HitCount; | |
public Friend FriendList; | |
public Person(String n) { | |
Name = n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Kütüphaneleri ekleyelim | |
library(palmerpenguins) | |
library(ggplot2) | |
library(tidyverse) | |
library(corrplot) | |
library(GGally) | |
library(gapminder) | |
data(package = 'palmerpenguins') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from peewee import * | |
db = SqliteDatabase('e_commerce.db') | |
# Basemodel dediğimiz şey şu en temel model olarak yazıyoruz. | |
class BaseModel(Model): | |
class Meta: | |
database = db | |
class Categories(BaseModel): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
number = (1,2,3,4,5,6,7,8,9,10) | |
def odd(number): | |
if number % 2==0: | |
return True | |
else : | |
return False | |
errorcount=1 | |
domaincount=1 |