Furniture Prediction with Application of Machine Learning

The objective of this project is to teach the computer to make a prediction of what furniture should be specified to furnish a space using prior Revit models as the learning data.

The system modeler will use a large set of rooms, successfully furnished, to train the machine learning algorithm (Naïve Bayes classifier). Rooms will have parameters such as length, width and program. Rooms have other attributes such as relationship to circulation, and location of windows that should be taken into consideration when designing the system. Parameters such as area, perimeter and the length/width ratio of the room will also be generated by combination of the parameters that we have previously defined and then implemented into our Machine Learning algorithm. After implementing these parametric data into the machine, the system modeler will use other “empty” rooms to test the algorithm to see how it works. Once a successful match is made, the interior designer will import the furniture as Revit families into the room, allowing them to finalize the furniture layout and to test/modify the suggesting made by the machine learning algorithm.  The revisions made by the interior designer will be used updated the machine learning data set. 

The following figures show the use of the same Machine Learning algorithm in the Rhinoceros 3d modeling software and the grasshopper plugin. I implemented this MachineLearning application into lunchbox grasshopper plugin as a part of my internship with proving ground.


Process Model

The stakeholders will be an architect, an interior designer, one or more furniture suppliers and a system modeler. The roles of the stakeholders are as follows:

 The furniture suppliers: The furniture suppliers will provide typical room layouts with specified furniture from their company. They may also provide examples from prior built work.

The system modeler: The system modeler will assess each room (layout and furniture) provided and encode the “characteristics” or “parameters” of these rooms into the machine learning data model.

The architect: The architect will design the overall building and configure the rooms, mapping the building program onto the individual spaces.

The interior designer: Since we will need many rooms to build a machine learning database, the interior designer will also provide a set of rooms, successfully furnished in the last projects and provide it to the system modeler. The next role of the interior designer is to deploy the machine learning application, which will suggest furniture for the rooms based on parameters extracted from the Revit model.


Data Model

In this project, the Non-Model data is also extracted from the Revit projects in form of Room and Family Schedules. The concept of this project is about automation and using the machine intelligence, which is the main reason for binding Non-Model data to the Model data, resulting in less human interference and a faster process. The actual Non-Model data, which is used to make this process includes Room name (program), area and the furniture package in each room. The other data, such as Room length, Width, Material or the location of Furniture package can also be extracted from the Revit model in form of schedules. The schedules are then exported as excel files and combined together to make the learning database for the Naïve Bayes Classifier.


Building the Learning Data

The first step for implementing the system was to build the leaning data. In order for the machine learning algorithm to work properly, we need a large set of learning data. In this project the data was obtained by going through 10 previously furnished work-space projects and properly assigning the rooms. The next  part was to export the room and furniture schedules, containing the room names, area, perimeter and furniture packages, to excel/csv.

It needs to be mentioned that other attributes such as material properties of the room can also be extracted and used in the learning data.


Building the Test Data

The next step was to create an unfurnished project to test the machine learning algorithm on. This step consisted of going through an unfurnished project and assign rooms(zones of activity).


Overview of the System

The main inputs of the system consist of the leaning data and parameters of the selected room. The leaning data is extracted by sorting and cleaning the previous models’ room and furniture schedules (exported to excel/CSV). The parameters of the selected room, which is subject to furniture prediction, are extracted on the go, by simply selecting the room.


Dynamo From a Closer View

To further explain the system, the Dynamo script is presented from up-close.

In the first part the Furniture and room schedules are imported by Excel readers, and the non-usable lines are removed from them.

The next step is cleaning up the data. This step includes removing the rooms that the 2 schedules don’t have in common (the rooms that are declared but don’t have a specified furniture), joining the furniture families in each room as a single furniture package, cleaning up room names ( eg: Office instead of Office02). This step also included parameterizing the room sizes from integer values to values such as: xsmall, small, medium,…. This step is required because the Naïve Bayes Classifier takes inputs of type String.

We need to create a data table from the cleaned-up data, to use as our machine leaning leaning data.

The next part is addressing the data from the empty rooms such as the name and area. The area needs to go through the process of changing the data type from integer values to values such as xsmall, small, … to be readable by the Naiive Bayes Classifier.

In the last section, one room is selected from the list of the rooms and is used as input to the Naïve Bayes classifier’s Test Data. The learning data is also connected to this component. The Machine learning component gives us the predicted furniture as a package of furniture families. This component will also give us other data about the predicted furniture, such as the probabilities .


Results

The system was implemented separately in Dynamo and also Revit API. The same logic, used in the dynamo script, was also used and coded in C# for developing the project in Revit API. A sample interaction with the system developed in Revit API is provided below. The user selects the Furniture Predict component from the Revit interface and is asked to select a room. When the user selects a room, the system goes through the learning data from the previous projects (converted to excel/CSV) and offers a list of furniture families, predicted for the selected room.

I BUILT MY SITE FOR FREE USING