Elza Shakirova (9c5b3730) at 09 Jun 13:34
The hour function has been changed.To generate data every 15 minutes instead of 30. And converting titles to lowercase.
Need to change the function "hour" to Generate data every 15 minutes instead of 30
def hour(s): if s % 1 != 0: s = str(s - 0.5)[:-2] if (len(str(s))) == 1: s = '0' + str(s) return str(s) + ':15' if len(str(s)) == 1: return '0' + str(s) + ':00' return str(s) + ':00'
Elza Shakirova (f7fb77eb) at 06 Jun 22:17
Issue 8: I think we need to remove the "nodeName" Carbon Monoxide Sensor. Because we do not take into account the state of the air to evaluate sleep. But I think I need to save the Air Quality Sensor data, since it shows the air temperature.
Issue 9: Most seniors go to bed early and wake up early at 7 p.m. or 8 p.m. and wake up at 3 a.m. or 4 a.m. https://www.sleepfoundation.org/circadian-rhythm/how-age-affects-your-circadian-rhythm#:~:text=According%20to%20their%20internal%20body,bed%20several%20hours%20later%20instead .
I think during this period of time we should check the motion sensor. If there is no activity, then set the value to True. But there are exceptions when a person is washed at night to get to the bathroom. In this case, you can set a timer or a delay of 20 minutes. As for daytime sleep: Daytime napping: Research estimates that about 25% of older adults take naps, compared with around 8% of younger adults.
For this case, you can check for sensors in the bedroom and in the living room. That is, if a person entered the room (and if we can find out if he left), after a while we check the activity. If there is no activity, then set True
Elza Shakirova (2ec2edf6) at 02 May 12:34
Added ML-Algorithms for our task.
Machine Learning Algorithms
I reviewed algorithms for Machine Learning. I chose a few that I think are the most suitable.
A decision tree is a series of nodes, a directional graph that starts at the base with a single node and extends to the many leaf nodes that represent the categories that the tree can classify. Another way to think of a decision tree is as a flow chart, where the flow starts at the root node and ends with a decision made at the leaves. It is a decision-support tool. It uses a tree-like graph to show the predictions that result from a series of feature-based splits.
Pros for our project:
Exploratory data analysis: Decision trees can enable analysts to identify significant variables and important relations between two or more variables, helping to surface the signal contained by many input variables.
Minimal data cleaning: Because decision trees are resilient to outliers and missing values, they require less data cleaning than some other algorithms.
Any data type: Decision trees can make classifications based on both numerical and categorical variables.
Minuses:
Overfitting: Over fitting is a common flaw of decision trees. Setting constraints on model parameters and making the model simpler through pruning are two ways to regularize a decision tree.
Heavy feature engineering: The flip side of a decision tree’s explanatory power is that it requires heavy feature engineering. When dealing with unstructured data or data with latent factors, this makes decision trees sub-optimal. Neural networks are clearly superior in this regard.
Random Forest is a trademark term for an ensemble of decision trees. In Random Forest, we’ve collection of decision trees (so known as “Forest”). To classify a new object based on attributes, each tree gives a classification and we say the tree “votes” for that class. The forest chooses the classification having the most votes (over all the trees in the forest).
Each tree is planted & grown as follows:
-If the number of cases in the training set is N, then sample of N cases is taken at random but with replacement. This sample will be the training set for growing the tree. -If there are M input variables, a number m<<M is specified such that at each node, m variables are selected at random out of the M and the best split on these m is used to split the node. The value of m is held constant during the forest growing. -Each tree is grown to the largest extent possible. There is no pruning.
Pros
Cons
It is a classification technique based on Bayes’ theorem with an assumption of independence between predictors. In simple terms, a Naive Bayes classifier assumes that the presence of a particular feature in a class is unrelated to the presence of any other feature. For example, a fruit may be considered to be an apple if it is red, round, and about 3 inches in diameter. Even if these features depend on each other or upon the existence of the other features, a naive Bayes classifier would consider all of these properties to independently contribute to the probability that this fruit is an apple.
Pros
Cons
Added ML-Algorithms for our task.