Git Product home page Git Product logo

ripleyk's Introduction

Hello

 About Me :

I am a Medical Physicist, Researcher and Programming & AI Enthusiast .

  • 🏥 Clinical Medical Physicist in Proton Beam Therapy at The Christie Hospital NHS.
  • 🔭 Honorary Researcher at The University of Manchester.
  • 🤖 Fascinated by AI & get to explore this in both an academic and practitioner manner.
  • ⚡ In my free time I play video games and contribute to various software projects.
  • 📫 How to reach me:   Linkedin Badge

🛠  Languages and Tools :

Python  C#  C++  Git  GitHub  Gitlab  Docker  PyTorch   CSS  HTML  LinuxDev  Flask  MySQL  Django  Postgresql  Bash  Tensorflow  Sqlite  Dart  Flutter 


🔥   My Stats :

GitHub Streak


ripleyk's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ripleyk's Issues

Quick radius bug for 1D case

Hi there - have been looking around for a good implementation of the K function and your one looks great! I'm actually using it for the 1D case, and I think I might have spotted a small bug in your code here:

score_vol = radius*2

Should that read: radius**2?

Understanding inputs (bounding radius?) and outputs

Hi,

Your function seems very useful. I'm not sure I understand the difference between radius and bounding radius.

I think the radius is the distance around each point where I want to measure K. Bounding radius seems to be the radius of the study area, used for spatial randomness assumptions? (Not having a perfect circular area, I'm using the maximum axis distance between two observations)

Here's a small example of how I'm applying your function and how my data is:

import ripleyk

# p1 is list of coordinate pairs
print(p1[2:7])
xs = np.array([i[0] for i in p1])
ys = np.array([i[1] for i in p1])

print(f"Xrange is: {max(xs) - min(xs)}")
print(f"Yrange is: {max(ys) - min(ys)}")

radius = [10,20]
bounding_radius = 150

k = ripleyk.calculate_ripley(radius, bounding_radius, d1=xs, d2=ys, CSR_Normalise=True)

k

Result:

[(56, 113), (43, 106), (41, 117), (67, 59)]
Xrange is: 90
Yrange is: 146
[2827.433388230814, 10040.27366432983]

So the output is the K value corresponding to each radius in the input. Do you have an implementation of p-value calculation (or rough estimation)? This very interesting paper minimizes Monte Carlo simulations for p-val estimation by having a model of point distribution that accounts for intensity and study area size.

https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0080914

Cheers,
Ricardo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.