Skip to content

Add weather temporal classifier example using ML#142

Closed
Brqndon1 wants to merge 1 commit intolab-v2:mainfrom
Brqndon1:BrandonLyubarsky_ML_classifier_temporal_logic_ex
Closed

Add weather temporal classifier example using ML#142
Brqndon1 wants to merge 1 commit intolab-v2:mainfrom
Brqndon1:BrandonLyubarsky_ML_classifier_temporal_logic_ex

Conversation

@Brqndon1
Copy link
Copy Markdown

Summary

Adds a new example demonstrating the TemporalLogicIntegratedClassifier using a weather-monitoring scenario.

Scenario

A neural classifier observes sky conditions (sunny / cloudy / rainy) from three simulated features: cloud coverage rate, humidity, and precipitation rate. Over multiple timesteps, temporal rules derive a storm warning and ultimately a cancel_voyage conclusion when rainy conditions persist.

Rules

  • storm_warning(sky) <-1 rainy(sky) — warning derived one step after rain
  • cancel_voyage(sky) <-1 rainy(sky), storm_warning(sky) — terminal state

Screenshots

Screenshot 2026-04-24 at 4 38 52 PM

Notes

  • Observed duplicate-fact-name warnings on repeated classifier calls
  • Used sys.setrecursionlimit(10000) - used to avoid a numba compile-time recursion limit on the environment

Copy link
Copy Markdown
Collaborator

@ColtonPayne ColtonPayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Brandon - this looks good, but needs a few changes:

  1. Please close this PR and make a new one from the main PyReason Repo, rather than your own fork. This way I can run the code on your branch without cloning your fork.
  2. The tutorial in the docs is missing, please add this as well

I will add more comments after these changes so I can run your code

@ColtonPayne
Copy link
Copy Markdown
Collaborator

Also, please make your branch names more concise in the future

@Brqndon1 Brqndon1 closed this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants