projets:plim:20142015:gr6
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
projets:plim:20142015:gr6 [2014/11/23 18:48] – zayani | projets:plim:20142015:gr6 [2014/11/23 23:00] (Version actuelle) – zayani | ||
---|---|---|---|
Ligne 43: | Ligne 43: | ||
</ | </ | ||
<div style=" | <div style=" | ||
+ | < | ||
+ | a. Main idea <br/> | ||
+ | b. GPS APIs <br/> | ||
+ | c. Collecting data <br/> | ||
+ | </ | ||
<div style=" | <div style=" | ||
<div style=" | <div style=" | ||
Ligne 49: | Ligne 54: | ||
< | < | ||
</ | </ | ||
- | <div style=" | + | <div style=" |
- | <div style=" | + | <div style=" |
<div style=" | <div style=" | ||
a. Battery optimization< | a. Battery optimization< | ||
Ligne 56: | Ligne 61: | ||
c. Data Storage | c. Data Storage | ||
</ | </ | ||
- | <div style=" | + | |
</ | </ | ||
Ligne 99: | Ligne 104: | ||
<div style=" | <div style=" | ||
<div style=" | <div style=" | ||
- | <div style=" | + | <div style=" |
To understand how we modelise our data, and how we manage them, we have elaborate a | To understand how we modelise our data, and how we manage them, we have elaborate a | ||
Ligne 105: | Ligne 110: | ||
< | < | ||
<div style=" | <div style=" | ||
- | <b>b. Architecture of the project</ | + | <h4>b. Architecture of the project</ |
</ | </ | ||
< | < | ||
< | < | ||
- | Our project is based on an MVC architecture with a model, controller and view, for collecting data, we have an GPS module with an asynchrone | + | Our project is based on MVC architecture with a model, controller and view for collecting data. We have a GPS module with an asynchronous |
+ | |||
< | < | ||
- | Classification Module is designed like a service, it take data as input and return classified data. The classification is divided into two part, firstly by a K-means | + | Classification Module is designed like a service; it takes data as an input and return classified data. The classification is divided into two parts; |
< | < | ||
- | Classification | + | This classification |
< | < | ||
- | Data are stored in a file in a JSON format, loaded at the start of the app and saved when the app is clossed. | + | Data are stored in a file in a "JSON" |
+ | To save, we use <a href=" | ||
< | < | ||
- | The user interface will contain | + | The user interface will contains |
< | < | ||
- | < | + | < |
< | < | ||
< | < | ||
Ligne 126: | Ligne 134: | ||
we can define our architecture by this diagram:< | we can define our architecture by this diagram:< | ||
- | < | + | < |
+ | style=" | ||
< | < | ||
If the diagram is not correctly displayed, <a href=" | If the diagram is not correctly displayed, <a href=" | ||
Ligne 136: | Ligne 145: | ||
<div style=" | <div style=" | ||
<div style=" | <div style=" | ||
- | <div style=" | + | <div style=" |
< | < | ||
GPS (Global Positioning System) sensor is a system that permits a user to specify his location via his smart phone. A group of classes provides information about the windows phone location service for the phone' | GPS (Global Positioning System) sensor is a system that permits a user to specify his location via his smart phone. A group of classes provides information about the windows phone location service for the phone' | ||
Ligne 144: | Ligne 153: | ||
System.Devices.Geolocation | System.Devices.Geolocation | ||
< | < | ||
- | <div style=" | + | <div style=" |
In our project we have imported some APIs so we can use the GPS of the device like:< | In our project we have imported some APIs so we can use the GPS of the device like:< | ||
- using Microsoft.Phone.Controls;< | - using Microsoft.Phone.Controls;< | ||
Ligne 152: | Ligne 161: | ||
< | < | ||
- | <div style=" | + | <div style=" |
< | < | ||
To collect location data, we Use Geolocator class, by the Geolocator object we can get a Geoposition object, the geoposition object provide us latitude and longitude: <br/> | To collect location data, we Use Geolocator class, by the Geolocator object we can get a Geoposition object, the geoposition object provide us latitude and longitude: <br/> | ||
Ligne 222: | Ligne 231: | ||
< | < | ||
<div style=" | <div style=" | ||
- | <b>a. K-means classification</ | + | <h4>a. K-means classification</ |
</ | </ | ||
< | < | ||
- | Before to use the algorithm of clustering, | + | Before to use the clustering |
<div style=" | <div style=" | ||
<div style=" | <div style=" | ||
Ligne 234: | Ligne 243: | ||
< | < | ||
- Supervised Classification< | - Supervised Classification< | ||
- | The supervised classification methods are based on user-defined classes and corresponding representative sample sets. The sample sets are specified by training | + | The supervised classification methods are based on user-defined classes and corresponding representative sample sets. These sample sets are specified by training data sets, which must be created prior to entering the Automatic Classification process. The supervised Classification methods are: Minimum Distance to Mean, Maximum Likelihood, |
- | The supervised Classification methods are: Minimum Distance to Mean, Maximum Likelihood,... | + | |
</ | </ | ||
< | < | ||
< | < | ||
- Unsupervised Classification <br/> | - Unsupervised Classification <br/> | ||
- | The unsupervised classification methods are algorithms that analyze and classify a large number of raster cells. | + | The unsupervised classification methods are algorithms that analyze and classify a large number of raster cells. |
- | Some unsupervised classification | + | |
</ | </ | ||
Ligne 248: | Ligne 255: | ||
< | < | ||
- | Data clustering is the process of allocate an object to a class according to his characteristics A1... An. The most common technique for clustering numeric data is called the k-means algorithm. <br/> | + | Data clustering is the process of allocating |
The k-means is an Unsupervised Classification. Using to find groups of similar or related objects and different from (or unrelated to) the objects in other groups. | The k-means is an Unsupervised Classification. Using to find groups of similar or related objects and different from (or unrelated to) the objects in other groups. | ||
</ | </ | ||
- | <img src=" | + | <img src=" |
< | < | ||
If the image is not correctly displayed, <a href=" | If the image is not correctly displayed, <a href=" | ||
Ligne 258: | Ligne 265: | ||
< | < | ||
- | k-means clustering is a method of classifying items into k groups.<br/> | + | k-means clustering is a method of classifying items into k groups |
- Each point is assigned to the cluster with the closest centroid< | - Each point is assigned to the cluster with the closest centroid< | ||
- A centroid is "the center of mass of a geometric object of uniform density" | - A centroid is "the center of mass of a geometric object of uniform density" | ||
Ligne 311: | Ligne 318: | ||
<div style=" | <div style=" | ||
- | <b>b. Sequential classification</ | + | <h4>b. Sequential classification</ |
</ | </ | ||
Ligne 317: | Ligne 324: | ||
This part of classification aims to build typical day, indeed a typical week is a composition of 5 typical day. | This part of classification aims to build typical day, indeed a typical week is a composition of 5 typical day. | ||
< | < | ||
- | Firstable, we will group SlotTime by day of week, we give a list of slotime and the day in parameters and the method return the list of slotime corresponding to this day: | + | First of all, we will group SlotTime by day of week, we give a list of slotime and the desired |
< | < | ||
<div style=" | <div style=" | ||
- public List$Slotime slotimeForOneday(List$Slotime brutSlotimes, | - public List$Slotime slotimeForOneday(List$Slotime brutSlotimes, | ||
< | < | ||
- | The second step is, from a list of slotime | + | After that, we will group similar SlotTimes and define their frequencies |
< | < | ||
- | To group slot time by similarity we base on the Start hour and minute, the end hour and minute | + | In order to do this, the partition of frequencies is based on three parameters: |
We provide a list of slot time, specific to a day of week in parameters, and we get a list where slottimes are grouped and the frequence has been defined to each different slot time. | We provide a list of slot time, specific to a day of week in parameters, and we get a list where slottimes are grouped and the frequence has been defined to each different slot time. | ||
< | < | ||
Ligne 331: | Ligne 338: | ||
< | < | ||
- | For the last step, we have to return a list of typical slot from a list of slot time. The list that we have to provide have to be processed by previous methods. < | + | Finally, we have to return a list of typical slot from a list of slot time. The list that we have to provide have to be processed by previous methods. < |
- | The following method, will provide us the calendar of location of a day of week, by slot time of 15min. Then, for every slot of 15min, situated between 8 am and 7 pm, we will assign a location by the max frequency of slotimes | + | The following method, will provide us the calendar of location of a day of week, by slot time of 15min. Then, for every slot of 15min, situated between 8 am and 7 pm, we will assign a location by the max frequency of slotimes |
< | < | ||
< | < | ||
Ligne 344: | Ligne 351: | ||
<div style=" | <div style=" | ||
- | <div style=" | + | <div style=" |
< | < | ||
- | <div> | + | |
+ | < | ||
+ | <div style=" | ||
+ | < | ||
+ | |||
+ | <a href=" | ||
+ | Download project from GoogleDrive</ | ||
+ | < | ||
+ | < | ||
+ | <a href=" | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | |||
+ | < | ||
The interface of our application " | The interface of our application " | ||
< | < | ||
Ligne 355: | Ligne 377: | ||
</ | </ | ||
< | < | ||
- | <img src=" | + | <img src=" |
If the image is not correctly displayed, <a href=" | If the image is not correctly displayed, <a href=" | ||
< | < | ||
Ligne 364: | Ligne 386: | ||
</ | </ | ||
< | < | ||
- | <img src=" | + | <img src=" |
If the image is not correctly displayed, <a href=" | If the image is not correctly displayed, <a href=" | ||
< | < | ||
Ligne 373: | Ligne 395: | ||
</ | </ | ||
< | < | ||
- | <img src=" | + | <img src=" |
If the image is not correctly displayed, <a href=" | If the image is not correctly displayed, <a href=" | ||
< | < | ||
Ligne 380: | Ligne 402: | ||
</ | </ | ||
< | < | ||
- | <img src=" | + | <img src=" |
If the image is not correctly displayed, <a href=" | If the image is not correctly displayed, <a href=" | ||
< | < | ||
Ligne 389: | Ligne 411: | ||
<div style=" | <div style=" | ||
- | <div style=" | + | <div style=" |
< | < | ||
<div style=" | <div style=" | ||
- | <b>a. Optimization battery</ | + | <h4>a. Optimization battery</ |
</ | </ | ||
< | < | ||
Ligne 404: | Ligne 426: | ||
</ | </ | ||
<div style=" | <div style=" | ||
- | <b>b. Classification | + | <h4>b. Classification |
</ | </ | ||
- | <br/><br/> | + | < |
< | < | ||
To improve our classification, | To improve our classification, | ||
+ | < | ||
+ | we can process as follow:< | ||
- | we can process as follow: | + | 1. Get slotimes by day of week (Monday, tuesday, wednesday, thursdayn friday).<br/> |
- | + | 2. Get cluster for each day, with X,Y and the start time (DateTime in minute from OOhOO): Cluster(x, | |
- | 1. Get slotimes by day of week (Monday, tuesday, wednesday, thursdayn friday). | + | 3. For every cluster that we got in the previous step, get news cluster with the end time params: Cluster(x, |
- | 2. Get cluster for each day, with X,Y and the start time (DateTime in minute from OOhOO): Cluster(x, | + | 4. Define most popular slot time with her frequency, by counting the number of value for every cluster obtained.<br/> |
- | 3. For every cluster that we got in the previous step, get news cluster with the end time params: Cluster(x, | + | |
- | 4. Define most popular slot time with her frequency, by counting the number of value for every cluster obtained. | + | |
5. Define the typical day by considering the higher frequency of slotimes. | 5. Define the typical day by considering the higher frequency of slotimes. | ||
+ | < | ||
6. For every new data, assign to the nearer cluster or when a cluster is beiing too large, divide it in two cluster. | 6. For every new data, assign to the nearer cluster or when a cluster is beiing too large, divide it in two cluster. | ||
Ligne 424: | Ligne 446: | ||
</ | </ | ||
<div style=" | <div style=" | ||
- | <b>b. Data Storage</ | + | <h4>c. Data Storage</ |
</ | </ | ||
Ligne 467: | Ligne 489: | ||
</ | </ | ||
+ | |||
+ | < | ||
+ | |||
+ | < | ||
< | < | ||
Ligne 472: | Ligne 498: | ||
< | < | ||
- | <a href=" | + | <a href=" |
<a href=" | <a href=" |
projets/plim/20142015/gr6.1416768526.txt.gz · Dernière modification : 2014/11/23 18:48 de zayani