2022년 11월 6일 일요일

[그래프 그리는 사이트] Manhattan Plot

 [그래프 그리는 사이트]Manhattan Plot


The prepared example data has the same structure as above.
Your data should also be prepared in the same structure.
준비된 예제 데이터는 위와 같은 구조로 되어있습니다. 
여러분의 데이터도 같은 구조로 준비해야 합니다. 



The Manhattan Plot is readily available.
Now the rest are just a few decorating options.
Manhattan Plot을 쉽게 구할 수 있습니다.
이제 나머지는 약간의 꾸미는 옵션들일뿐입니다. 
준비중


You can adjust the maximum range of the y-axis 
and the position of the red and blue horizontal lines.
y축의 최대 범위와 빨간색과 파란색의 수평선의 위치를 조절할 수 있습니다. 


You can change the color palette.
You can also decide how many colors to use.
색의 팔레트를 바꿀 수 있습니다. 
몇 개의 색을 사용할 것인지도 정할 수 있습니다.



You can also take a closer look by selecting 'single chromosome'.
'single chromosome'을 선택하여 좀 더 자세히 관찰해 볼 수도 있습니다.


This option rarely needs to be touched.
This is used when the uploaded data is very large 
and you want to view only a portion of it.
이 옵션은 거의 건드릴 필요가 없습니다. 
업로드한 데이터가 매우 커서 일부분만 보고 싶을 때 사용하는 것입니다. 

'plot download'를 통해서 plot size를 조절하세요. 
< PDF >, < SVG > < pptx >를 클릭하면 각각의 형식으로 다운로드 받을 수 있습니다.

Adjust the plot size through 'plot download'.
You can download each format by clicking < PDF >, < SVG > < pptx >.


당신의 데이터를 업로드 하려면 'want to use'를 활성화한 다음, 'Browse'를 클릭하세요.
오직 csv 파일만이 사용가능합니다.
Activate 'want to use' to upload your data, then click 'Browse'.
Only csv file is available.


[그래프 그리는 사이트] K-means Clustering

[그래프 그리는 사이트]K-means Clustering


Column 1 of the example data contains the name of each person. Starting from column 2, the rest have scores (numeric variables).
예제 데이터의 1열에는 각 사람의 이름이 있습니다. 2열부터 나머지에는 점수(숫자 변수)가 있습니다.


All numbers should be standardized. 
This is because the units and ranges of each number are different.
숫자들은 모두 표준화를 해야 합니다. 각 숫자들의 단위와 범위가 다르기 때문입니다.


This is a plot to help determine how many clusters it is appropriate to divide into.
It shows that 3 clusters are suitable.

몇 개의 cluster로 나누는 것이 적당한지 도움을 주는 plot입니다. 
3개의 cluster가 적당하다고 보여줍니다.





Select the second option, wss. It's like showing a cross section of a mountain. Where is the part that changes from the mountain to the slope, that is, the flat part? 
This picture is really vague, but the part where the steep slope becomes gentle is a little vague from 2 to 4.
So, the number of clusters seems to be from 2 to 4.

두번째 옵션인 wss를 선택해 줍니다. 마치 산의 단면을 보여주는 것같은데 산에서 비탈로 바뀌는 부분 즉 평지 부분이 어디일까요? 
이 그림은 진짜 애매한데 급격한 경사가 완만해 지는 부분이 2부터 4까지 조금 애매합니다. 
그래서 cluster의 갯수는 2부터 4까지 가능할 것같습니다. 






Now change the option to 'silhouette' and you will see a different picture. 
This figure shows that the number of clusters is appropriate.
It is not very clear whether it is appropriate to divide into several clusters like this, 
and the subjectivity of the researcher may be involved.

이제 옵션을 'silhouette'으로 바꾸니 다른 그림이 보여집니다. 
이 그림에서는 cluster의 갯수가 2가 적당하다고 보여 줍니다. 
이처럼 몇 개의 cluster로 나누는 것이 적당한지는 아주 명확하지 않고 
연구자의 주관이 개입될 여지가 있습니다. 



Now, change the 'Select plot' from 'Optimal number' to 'k means tree(I)'.
And the current 'number of groups' is 3.
이제 'Select plot 을 'Optimal number'에서 'k means tree(I)'로 바꾸어 줍니다. 
그리고, 현재의 'number of groups'은 3입니다.

The resulting picture is like an upside-down tree branch. 
I think it's more of a root than a branch of a tree, 
but people usually use the word 'dendro-' to mean a branch.
When the branch splits and then splits into three, a square is formed.
결과적으로 만들어진 그림은 나뭇가지를 거꾸로 그려진 것같은 그림입니다. 
제 생각에는 나무의 가지보다는 뿌리에 가깝지만, 
사람들은 보통 나뭇가지를 의미하는 'dendro-'라는 말을 씁니다. 
가지가 갈라지다가 3개로 갈라질 때의 묶음으로 사각형이 형성되어 있습니다. 


If you change 'number of groups' to 2, the box will be changed to 2.
Let's imagine. There is a horizontal line, so it descends slowly and at a constant speed from top to bottom. Assuming the horizon cuts this branch, 
there will still be two boxes while the horizon descends for a long time.
Then, when the height is about 10-13, there will be 3 boxes, 
and when the height is 5-10, there will be 4 boxes.
Where is the high range of this horizontal line?
For quite some time there are 2 boxes, then 3 short, then 4 slightly longer.

 'number of groups'을 2ㄹ 바꾸어 주면 상자가 2개로 바뀝니다. 
상상해 봅시다. 수평선이 있어서 위에서부터 아래로 천천히 일정한 속도로 내려옵니다. 
수평선이 이 가지를 자른다고 가정할 때, 
수평선이 오랜 시간 내려오는 동안 계속 상자는 2개일 것입니다. 
그러다가 높이가 10-13정도일 때는 상자가 3개이다가 
높이가 5-10일 때는 상자가 4가 될 것입니다. 
이 수평선의 높이의 범위가 높은 부분은 어디인가요?
꽤 오랜 동안 상자가 2개이다가 짧게 3개이다가 다시 약간 길게 4개입니다.



If you select 'kmeans tree(II)', the parameter color will change not only for the box but also for the tree.
'kmeans tree(II)'를 선택한다면, 상자뿐 아니라 나무까지 모수 색이 달라지게 됩니다.



'cluster plot' calculates the distances of relative points and displays them on the coordinate plane. 
Now let's group these points into groups. 
They are also shown by grouping them by color.

'cluster plot'은 상대적인 점들의 거리를 계산해서 좌표평면에 보여 줍니다. 이제 이 점들을 몇 개의 집단으로 묶어 봅니다. 색으로 집단별로 구분해서 보여주기도 합니다.






Now, after selecting 'heatmap', let's adjust the number of 'number of groups 
and 'number of factor'.
The created heatmap seems to have little difference, but if you move the numbers, 
you can see that the spacing of the tiles varies according to the numbers.
There is a difference between tying horizontally and vertically.
Let's think of this data as student grades.
There is a way to group similar students together and classify similar subjects. 
Horizontal and vertical mean it.
이제 'heatmap 을 선택한 뒤에 
'number of groups 과 'number of factor'의 숫자를 조절해 봅시다. 
만들어진 heatmap이 거의 차이가 없는 것같지만, 
숫자를 움직여 보면 숫자에 따라 tile들의 간격이 달라지는 것을 알 수 있습니다. 
가로방향과 세로 방향으로 묶어지는 것이 다릅니다. 
이 data가 학생들의 성적이라고 생각해 봅시다. 
비슷한 학생들끼리 묶어서 분류하는 방식이 있고, 
비슷한 과목들을 분류하기도 할 것입니다. 가로와 세로가 그것을 의미합니다.  




Now let's look at the various mathematical options 
to calculate this distance and which points to group together.
Experiment with how the picture changes by changing these options.
이제 이 거리를 계산하고 어떤 점들을 하나로 묶을 것인지 계산하는 
수학적인 다양한 옵션들을 만나보겠습니다. 
이옵션들을 바꾸어 보면서 그림이 어떻게 바뀌는지 직접 실험해 보세요. 

'plot download'를 통해서 plot size를 조절하세요. 
< PDF >, < SVG > < pptx >를 클릭하면 각각의 형식으로 다운로드 받을 수 있습니다.

Adjust the plot size through 'plot download'.
You can download each format by clicking < PDF >, < SVG > < pptx >.


당신의 데이터를 업로드 하려면 'want to use'를 활성화한 다음, 'Browse'를 클릭하세요.
오직 csv 파일만이 사용가능합니다.
Activate 'want to use' to upload your data, then click 'Browse'.
Only csv file is available.


2022년 11월 5일 토요일

[그래프 그리는 사이트] ROC curves Comparison

[그래프 그리는 사이트] ROC curves Comparison


Column 1 of the example data contains the true values:
with disease (1) and without disease (0).

From column 2 of the example data, there are results of various diagnostic methods. All are continuous variables.

예제 데이터의 1열에는 참값 즉 질병이 있는 것(1)과 질병이 없는 것(0)의 결과가 있습니다. 

예제 데이터의 2열부터는 다양한 진단방법의 결과들이 있습니다. 모두 연속변수들입니다.



One ROC is drawn.

하나의 ROC 가 그려집니다.


This is because the default is set to draw one ROC starting from the second column.

2번째열부터 시작해서, 1개의 ROC를 그려라고 디폴트로 설정되어 있기 때문입니다.


If you change the option to draw 3 ROCs starting from the second column,

2번째열부터 시작해서, 3개의 ROC를 그려라고 옵션을 바꾸어 준다면,



You will get this result.

After a statistical test comparing the two ROCs, the p-value is shown.

For aesthetic reasons, you can only draw up to 4 ROCs.

당신은 이런 결과를 얻게 될 것입니다. 

두 개의 ROC를 비교한 통계적 검정 후 p값이  보입니다.

심미적인 이유로 최대 4개의 ROC까지만 그릴 수 있습니다.


Sensitivity and specificity are visible in the 3rd tab, only for one ROC starting.

민감도와 특이도는 3번째 탭에서 볼 수 있는데,
시작하는 하나의 ROC에 대해서만 보여 집니다. 


Adjust the plot size through 'plot download'.
You can download it in <PDF> or other formats.

'plot download'를 통해서 plot size를 조절하세요. 
< PDF > 또는 다른 형식으로 다운로드 받을 수 있습니다.


You can upload your own data by using 'want to use my data'.

You can upload it by carefully referring to the format of the example data.

'want to use my data'를 이용하여 자신의 데이터를 올릴 수 있습니다. 

예제 데이터의 형식을 잘 참고하여 업로드하면 됩니다.

[그래프 그리는 사이트] survival analysis & Kaplan Meier curves

[그래프 그리는 사이트]survival analysis & Kaplan Meier curves



To plot Kaplan Meier curves, we need 3 columns of data as shown above.
Kaplan Meier curves를 그리기 위해서는 위에서 본 것과 같이 3열의 데이터가 필요합니다.



Common and recommended Kaplan Meier curves are drawn right away.
In particular, it is desirable to have 'Number at risk'  below the graph.

일반적이고 권장할만한 Kaplan Meier curves가 바로 그려집니다. 
특히 Number at risk가 그래프 아래에 표현되도록 하는 것이 바람직합니다.



If the graph is too complex, you can omit the 'confidence interval'.
The interval on the x-axis can also be appropriately adjusted according to the unit of time, and 'Number at risk' is automatically calculated according to the unit.
I would recommend omitting the 'p-value' unless absolutely necessary.

그래프가 너무 복잡한 경우에는 'confidence interval'를 생략할수도 있습니다.
x축의 간격도 time의 단위에 따라 적절히 조절할 수 있고 'Number at risk'도 그 단위에 따라 자동으로 계산됩니다.
'p-value'는 꼭 필요하지 않다면 빼도록 저는 추천하겠습니다.



Sometimes showing a horizontal line showing 50% and its vertical line 
can be helpful for understanding.
You can also plot other related graphs, such as 'cumulative events'.

간혹 50%를 보여주는 수평선과 그의 수직선을 보여주는 것이 
이해에 도움이 될 수 있습니다. 
'cumulative events' 등의 연관된 다른 그래프도 그릴 수 있습니다.



There are several options for calculating the CI of the survival table, 
and beginners can choose the default value.

survival table의 CI를 계산해주는 몇 가지 옵션이 있으며 
초보자들은 디폴트값을 선택하면 되겠습니다.



There are several ways to calculate the p-value, 
and in most cases a beginner can choose the default value.
p값을 계산하는 몇 가지 방법이 존재하며 
보통의 경우에 초보자는 디폴트값을 선택하면 됩니다. 



Summary statistics are also textually available.
요약 통계량도 문자로 확인 가능합니다.


Let's take the second example data, myeloma.
두번째 예제 데이터인 myeloma를 선택해 봅시다.


Since there are 3 groups, 3 survival curves are shown.
3개의 집단이므로 3개의 생존곡선이 보여집니다.


Since it is a comparison of three or more groups, a post-hoc test is required, 
and an appropriate p-value adjustiment can be selected for this.
3집단 이상의 비교이므로 사후 검정이 필요하며, 
이에 적절한 p값의 보정을 선택할 수 있습니다.


As you can see in the picture again, 
there is no significant difference between 'Obs' and 'Lev'.
그림에서 본 것과 같이 'Obs'와 'Lev'는 큰 차이가 없음을 다시 볼 수 있습니다.


Adjust the plot size through 'plot download'.
You can download it in <PDF> or other formats.

'plot download'를 통해서 plot size를 조절하세요. 
< PDF > 또는 다른 형식으로 다운로드 받을 수 있습니다.


Activate 'want to use' to upload your data, then click 'Browse'.
Only csv file is available.
당신의 데이터를 업로드 하려면 'want to use'를 활성화한 다음, 'Browse'를 클릭하세요.
오직 csv 파일만이 사용가능합니다.